File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -299,32 +299,32 @@ function recursivelyInsertClonesFromExistingTree(
299
299
switch ( child . tag ) {
300
300
case HostComponent : {
301
301
const instance : Instance = child . stateNode ;
302
- let keepTraversing : boolean ;
302
+ let nextPhase : VisitPhase ;
303
303
switch ( visitPhase ) {
304
- case CLONE_UPDATE :
305
- case CLONE_UNCHANGED :
306
- // We've found any "layout" View Transitions at this point so we can bail.
307
- keepTraversing = false ;
308
- break ;
309
304
case CLONE_EXIT :
310
305
case CLONE_UNHIDE :
311
306
case CLONE_APPEARING_PAIR :
312
307
// If this was an unhide, we need to keep going if there are any named
313
308
// pairs in this subtree, since they might need to be marked.
314
- keepTraversing =
315
- ( child . subtreeFlags & ViewTransitionNamedStatic ) !== NoFlags ;
309
+ nextPhase =
310
+ ( child . subtreeFlags & ViewTransitionNamedStatic ) !== NoFlags
311
+ ? CLONE_APPEARING_PAIR
312
+ : CLONE_UNCHANGED ;
316
313
break ;
314
+ default :
315
+ // We've found any "layout" View Transitions at this point so we can bail.
316
+ nextPhase = CLONE_UNCHANGED ;
317
317
}
318
318
let clone : Instance ;
319
- if ( keepTraversing ) {
319
+ if ( nextPhase !== CLONE_UNCHANGED ) {
320
320
// We might need a handle on these clones, so we need to do a shallow clone
321
321
// and keep going.
322
322
clone = cloneMutableInstance ( instance , false ) ;
323
323
recursivelyInsertClonesFromExistingTree (
324
324
child ,
325
325
clone ,
326
326
null ,
327
- visitPhase ,
327
+ nextPhase ,
328
328
) ;
329
329
} else {
330
330
// If we have no mutations in this subtree, and we don't need a handle on the
You can’t perform that action at this time.
0 commit comments