Skip to content

Commit fbb628b

Browse files
author
Brian Vaughn
committed
Fixed the issue with the Suspense fuzz tester
1 parent 721c813 commit fbb628b

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

packages/react-reconciler/src/ReactFiberCommitWork.new.js

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,8 @@ function recursivelyCommitLayoutEffects(
455455

456456
let child = finishedWork.child;
457457
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) {
461460
if (__DEV__) {
462461
const prevCurrentFiberInDEV = currentDebugFiberInDEV;
463462
setCurrentDebugFiberInDEV(child);
@@ -541,9 +540,8 @@ function recursivelyCommitLayoutEffects(
541540
default: {
542541
let child = finishedWork.child;
543542
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) {
547545
if (__DEV__) {
548546
const prevCurrentFiberInDEV = currentDebugFiberInDEV;
549547
setCurrentDebugFiberInDEV(child);
@@ -644,18 +642,18 @@ function recursivelyCommitLayoutEffects(
644642
}
645643
}
646644
}
647-
break;
648-
}
649-
}
650645

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;
659657
}
660658
}
661659
}

0 commit comments

Comments
 (0)