File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
packages/svelte/src/compiler/phases/2-analyze/css Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -70,9 +70,7 @@ const css_visitors = {
7070 context . state . keyframes . push ( node . prelude ) ;
7171 } else if ( node . prelude . startsWith ( '-global-' ) ) {
7272 // we don't check if the block.children.length because the keyframe is still added even if empty
73- if ( ! context . state . has_unscoped_global . value && is_unscoped_global ( context . path ) ) {
74- context . state . has_unscoped_global . value = true ;
75- }
73+ context . state . has_unscoped_global . value ||= is_unscoped_global ( context . path ) ;
7674 }
7775 }
7876
@@ -97,14 +95,10 @@ const css_visitors = {
9795 }
9896
9997 if ( idx === 0 ) {
100- if (
101- ! context . state . has_unscoped_global . value &&
102- is_unscoped_global ( context . path , context . state . rule ) &&
103- context . state . rule &&
104- context . state . rule . block . children . length > 0
105- ) {
106- context . state . has_unscoped_global . value = true ;
107- }
98+ context . state . has_unscoped_global . value ||=
99+ ! ! context . state . rule &&
100+ context . state . rule . block . children . length > 0 &&
101+ is_unscoped_global ( context . path , context . state . rule ) ;
108102 }
109103 }
110104 }
You can’t perform that action at this time.
0 commit comments