@@ -560,7 +560,7 @@ function infinite_loop_guard() {
560560 }
561561}
562562
563- /** @type {Effect[] | null } */
563+ /** @type {Set< Effect> | null } */
564564export let eager_block_effects = null ;
565565
566566/**
@@ -577,7 +577,7 @@ function flush_queued_effects(effects) {
577577 var effect = effects [ i ++ ] ;
578578
579579 if ( ( effect . f & ( DESTROYED | INERT ) ) === 0 && is_dirty ( effect ) ) {
580- eager_block_effects = [ ] ;
580+ eager_block_effects = new Set ( ) ;
581581
582582 update_effect ( effect ) ;
583583
@@ -600,7 +600,7 @@ function flush_queued_effects(effects) {
600600
601601 // If update_effect() has a flushSync() in it, we may have flushed another flush_queued_effects(),
602602 // which already handled this logic and did set eager_block_effects to null.
603- if ( eager_block_effects ?. length > 0 ) {
603+ if ( eager_block_effects ?. size > 0 ) {
604604 old_values . clear ( ) ;
605605
606606 /** @type {Effect[] } */
@@ -615,7 +615,7 @@ function flush_queued_effects(effects) {
615615 let skip = false ;
616616 let ancestor = e . parent ;
617617 while ( ! skip && ancestor !== null ) {
618- if ( eager_block_effects . includes ( ancestor ) ) {
618+ if ( eager_block_effects . has ( ancestor ) ) {
619619 skip = true ;
620620 break ;
621621 }
@@ -632,7 +632,7 @@ function flush_queued_effects(effects) {
632632 update_effect ( e ) ;
633633 }
634634
635- eager_block_effects = [ ] ;
635+ eager_block_effects . clear ( ) ;
636636 }
637637 }
638638 }
0 commit comments