@@ -455,9 +455,8 @@ function recursivelyCommitLayoutEffects(
455
455
456
456
let child = finishedWork . child ;
457
457
while ( child !== null ) {
458
- const primaryFlags = child . flags & LayoutMask ;
459
- const primarySubtreeFlags = child . subtreeFlags & LayoutMask ;
460
- if ( primaryFlags !== NoFlags || primarySubtreeFlags !== NoFlags ) {
458
+ const primarySubtreeFlags = finishedWork . subtreeFlags & LayoutMask ;
459
+ if ( primarySubtreeFlags !== NoFlags ) {
461
460
if ( __DEV__ ) {
462
461
const prevCurrentFiberInDEV = currentDebugFiberInDEV ;
463
462
setCurrentDebugFiberInDEV ( child ) ;
@@ -541,9 +540,8 @@ function recursivelyCommitLayoutEffects(
541
540
default : {
542
541
let child = finishedWork . child ;
543
542
while ( child !== null ) {
544
- const primaryFlags = child . flags & LayoutMask ;
545
- const primarySubtreeFlags = child . subtreeFlags & LayoutMask ;
546
- if ( primaryFlags !== NoFlags || primarySubtreeFlags !== NoFlags ) {
543
+ const primarySubtreeFlags = finishedWork . subtreeFlags & LayoutMask ;
544
+ if ( primarySubtreeFlags !== NoFlags ) {
547
545
if ( __DEV__ ) {
548
546
const prevCurrentFiberInDEV = currentDebugFiberInDEV ;
549
547
setCurrentDebugFiberInDEV ( child ) ;
@@ -644,18 +642,18 @@ function recursivelyCommitLayoutEffects(
644
642
}
645
643
}
646
644
}
647
- break ;
648
- }
649
- }
650
645
651
- if ( enableScopeAPI ) {
652
- // TODO: This is a temporary solution that allowed us to transition away from React Flare on www.
653
- if ( flags & Ref && tag !== ScopeComponent ) {
654
- commitAttachRef ( finishedWork ) ;
655
- }
656
- } else {
657
- if ( flags & Ref ) {
658
- commitAttachRef ( finishedWork ) ;
646
+ if ( enableScopeAPI ) {
647
+ // TODO: This is a temporary solution that allowed us to transition away from React Flare on www.
648
+ if ( flags & Ref && tag !== ScopeComponent ) {
649
+ commitAttachRef ( finishedWork ) ;
650
+ }
651
+ } else {
652
+ if ( flags & Ref ) {
653
+ commitAttachRef ( finishedWork ) ;
654
+ }
655
+ }
656
+ break ;
659
657
}
660
658
}
661
659
}
0 commit comments