Skip to content

Commit 4289b72

Browse files
committed
tweak
1 parent 212fe9c commit 4289b72

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

packages/svelte/src/compiler/phases/2-analyze/css/css-analyze.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,12 @@ const css_visitors = {
221221

222222
if (idx !== -1) {
223223
is_global_block = true;
224+
224225
if (i === 0) {
225-
if (
226-
!context.state.has_unscoped_global.value &&
227-
is_unscoped_global(context.path) &&
228-
node.block.children.length > 0
229-
) {
230-
context.state.has_unscoped_global.value = true;
231-
}
226+
context.state.has_unscoped_global.value ||=
227+
node.block.children.length > 0 && is_unscoped_global(context.path);
232228
}
229+
233230
for (let i = idx + 1; i < child.selectors.length; i++) {
234231
walk(/** @type {AST.CSS.Node} */ (child.selectors[i]), null, {
235232
ComplexSelector(node) {

0 commit comments

Comments
 (0)