File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import type {FiberRoot} from './ReactInternalTypes';
1111import type { TransitionTypes } from 'react/src/ReactTransitionType' ;
1212
1313import { enableViewTransition } from 'shared/ReactFeatureFlags' ;
14+ import { includesTransitionLane } from './ReactFiberLane' ;
1415
1516export function queueTransitionTypes (
1617 root : FiberRoot ,
@@ -20,14 +21,16 @@ export function queueTransitionTypes(
2021 // TODO: We should really store transitionTypes per lane in a LaneMap on
2122 // the root. Then merge it when we commit. We currently assume that all
2223 // Transitions are entangled.
23- let queued = root . transitionTypes ;
24- if ( queued === null ) {
25- queued = root . transitionTypes = [ ] ;
26- }
27- for ( let i = 0 ; i < transitionTypes . length ; i ++ ) {
28- const transitionType = transitionTypes [ i ] ;
29- if ( queued . indexOf ( transitionType ) === - 1 ) {
30- queued . push ( transitionType ) ;
24+ if ( includesTransitionLane ( root . pendingLanes ) ) {
25+ let queued = root . transitionTypes ;
26+ if ( queued === null ) {
27+ queued = root . transitionTypes = [ ] ;
28+ }
29+ for ( let i = 0 ; i < transitionTypes . length ; i ++ ) {
30+ const transitionType = transitionTypes [ i ] ;
31+ if ( queued . indexOf ( transitionType ) === - 1 ) {
32+ queued . push ( transitionType ) ;
33+ }
3134 }
3235 }
3336 }
You can’t perform that action at this time.
0 commit comments