@@ -348,9 +348,10 @@ function commitDeletedPairViewTransitions(deletion: Fiber): void {
348
348
restoreViewTransitionOnHostInstances ( child . child , false ) ;
349
349
} else {
350
350
// We'll transition between them.
351
- const oldinstance : ViewTransitionState = child . stateNode ;
351
+ const oldInstance : ViewTransitionState = child . stateNode ;
352
352
const newInstance : ViewTransitionState = pair ;
353
- newInstance . paired = oldinstance ;
353
+ newInstance . paired = oldInstance ;
354
+ oldInstance . paired = newInstance ;
354
355
// Note: If the other side ends up outside the viewport, we'll still run this.
355
356
// Therefore it's possible for onShare to be called with only an old snapshot.
356
357
scheduleViewTransitionEvent ( child , props . onShare ) ;
@@ -399,9 +400,10 @@ export function commitExitViewTransitions(deletion: Fiber): void {
399
400
} else if ( pair !== undefined ) {
400
401
// We found a new appearing view transition with the same name as this deletion.
401
402
// We'll transition between them instead of running the normal exit.
402
- const oldinstance : ViewTransitionState = deletion . stateNode ;
403
+ const oldInstance : ViewTransitionState = deletion . stateNode ;
403
404
const newInstance : ViewTransitionState = pair ;
404
- newInstance . paired = oldinstance ;
405
+ newInstance . paired = oldInstance ;
406
+ oldInstance . paired = newInstance ;
405
407
// Delete the entry so that we know when we've found all of them
406
408
// and can stop searching (size reaches zero).
407
409
// $FlowFixMe[incompatible-use]: Refined by the pair.
0 commit comments