File tree 1 file changed +11
-8
lines changed
packages/react-reconciler/src
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';
11
11
import type { TransitionTypes } from 'react/src/ReactTransitionType' ;
12
12
13
13
import { enableViewTransition } from 'shared/ReactFeatureFlags' ;
14
+ import { includesTransitionLane } from './ReactFiberLane' ;
14
15
15
16
export function queueTransitionTypes (
16
17
root : FiberRoot ,
@@ -20,14 +21,16 @@ export function queueTransitionTypes(
20
21
// TODO: We should really store transitionTypes per lane in a LaneMap on
21
22
// the root. Then merge it when we commit. We currently assume that all
22
23
// 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
+ }
31
34
}
32
35
}
33
36
}
You can’t perform that action at this time.
0 commit comments