fix unused css ref detection

pull/1721/head
Rich Harris 7 years ago
parent bb1374f84b
commit 395a762982

@ -174,7 +174,7 @@ function applySelector(stylesheet: Stylesheet, blocks: Block[], node: Node, stac
} }
else if (selector.type === 'RefSelector') { else if (selector.type === 'RefSelector') {
if (node.ref === selector.name) { if (node.ref && node.ref.name === selector.name) {
stylesheet.nodesWithRefCssClass.set(selector.name, node); stylesheet.nodesWithRefCssClass.set(selector.name, node);
toEncapsulate.push({ node, block }); toEncapsulate.push({ node, block });
return true; return true;

Loading…
Cancel
Save