Skip to content

Commit

Permalink
Fixed the issue with the Suspense fuzz tester
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Sep 29, 2020
1 parent 721c813 commit fbb628b
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions packages/react-reconciler/src/ReactFiberCommitWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,8 @@ function recursivelyCommitLayoutEffects(

let child = finishedWork.child;
while (child !== null) {
const primaryFlags = child.flags & LayoutMask;
const primarySubtreeFlags = child.subtreeFlags & LayoutMask;
if (primaryFlags !== NoFlags || primarySubtreeFlags !== NoFlags) {
const primarySubtreeFlags = finishedWork.subtreeFlags & LayoutMask;
if (primarySubtreeFlags !== NoFlags) {
if (__DEV__) {
const prevCurrentFiberInDEV = currentDebugFiberInDEV;
setCurrentDebugFiberInDEV(child);
Expand Down Expand Up @@ -541,9 +540,8 @@ function recursivelyCommitLayoutEffects(
default: {
let child = finishedWork.child;
while (child !== null) {
const primaryFlags = child.flags & LayoutMask;
const primarySubtreeFlags = child.subtreeFlags & LayoutMask;
if (primaryFlags !== NoFlags || primarySubtreeFlags !== NoFlags) {
const primarySubtreeFlags = finishedWork.subtreeFlags & LayoutMask;
if (primarySubtreeFlags !== NoFlags) {
if (__DEV__) {
const prevCurrentFiberInDEV = currentDebugFiberInDEV;
setCurrentDebugFiberInDEV(child);
Expand Down Expand Up @@ -644,18 +642,18 @@ function recursivelyCommitLayoutEffects(
}
}
}
break;
}
}

if (enableScopeAPI) {
// TODO: This is a temporary solution that allowed us to transition away from React Flare on www.
if (flags & Ref && tag !== ScopeComponent) {
commitAttachRef(finishedWork);
}
} else {
if (flags & Ref) {
commitAttachRef(finishedWork);
if (enableScopeAPI) {
// TODO: This is a temporary solution that allowed us to transition away from React Flare on www.
if (flags & Ref && tag !== ScopeComponent) {
commitAttachRef(finishedWork);
}
} else {
if (flags & Ref) {
commitAttachRef(finishedWork);
}
}
break;
}
}
}
Expand Down

0 comments on commit fbb628b

Please sign in to comment.