@@ -13,7 +13,7 @@ import type {
1313 EmptyValue
1414} from '../types/index.js'
1515import {
16- createEffectScopeWithContext ,
16+ createDeferScopeWithContext ,
1717 effectScopeSwapper
1818} from '../effects.js'
1919import { isEmpty } from '../utils.js'
@@ -258,7 +258,7 @@ export function loop(
258258) : Child {
259259 const start = createTextNode ( )
260260 const end = createTextNode ( )
261- const effectScope = createEffectScopeWithContext ( )
261+ const deferScope = createDeferScopeWithContext ( )
262262 const fragment = document . createDocumentFragment ( )
263263 const blocksMap : LookupMap = new Map ( )
264264 const itemsList : LoopItemsList = {
@@ -279,7 +279,7 @@ export function loop(
279279 if ( itemsCount && prevItemsCount ) {
280280 // [...m] -> [...n]
281281 // swap
282- return effectScope ( ( ) => {
282+ return deferScope ( ( ) => {
283283 batch ( ( ) => reconcile (
284284 itemsList ,
285285 blocksMap ,
@@ -289,7 +289,7 @@ export function loop(
289289 end ,
290290 items
291291 ) )
292- } , true ) ( )
292+ } ) ( )
293293 }
294294
295295 const shouldRender = itemsCount || ! isPlaceholder
@@ -306,7 +306,7 @@ export function loop(
306306 if ( itemsCount ) {
307307 // [] -> [...n]
308308 isPlaceholder = false
309- runEffects = effectScope ( ( ) => {
309+ runEffects = deferScope ( ( ) => {
310310 reconcile (
311311 itemsList ,
312312 blocksMap ,
@@ -316,13 +316,12 @@ export function loop(
316316 end ,
317317 items
318318 )
319- } , true )
319+ } )
320320 } else if ( ! isPlaceholder ) {
321321 // ([...n] | []) -> []
322322 isPlaceholder = true
323- runEffects = effectScope (
324- ( ) => insertChildBeforeAnchor ( else_ ?.( ) , end ) ,
325- true
323+ runEffects = deferScope (
324+ ( ) => insertChildBeforeAnchor ( else_ ?.( ) , end )
326325 )
327326 }
328327
0 commit comments