Skip to content

Commit

Permalink
Update packages/compiler-sfc/src/style/pluginScoped.ts
Browse files Browse the repository at this point in the history
Co-authored-by: edison <daiwei521@126.com>
  • Loading branch information
linzhe141 and edison1105 authored Sep 12, 2024
1 parent aade28a commit 9e79235
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/compiler-sfc/src/style/pluginScoped.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ function isSpaceCombinator(node: selectorParser.Node) {
return node.type === 'combinator' && /^\s+$/.test(node.value)
}
function extractAndWrapNodes(parentNode: Rule | AtRule) {
const nodes = (parentNode.nodes || []).filter(
if(!parentNode.nodes) return
const nodes = parentNode.nodes.filter(
node => node.type === 'decl' || node.type === 'comment',
)
if (nodes.length) {
Expand Down

0 comments on commit 9e79235

Please sign in to comment.