From 168da8d55782f3b34e2a6aa0c4dd0587696afdbd Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Tue, 12 Apr 2022 15:41:34 -0400 Subject: [PATCH] Fix typo that happened during rebasing I changed the type of this functions returned value but forgot to change the check. It happens to work before anyway, because eventually the interleaved updates will get transferred at the beginning of the next render phase. But this is more logically consistent. --- packages/react-reconciler/src/ReactFiberWorkLoop.new.js | 2 +- packages/react-reconciler/src/ReactFiberWorkLoop.old.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js index 3f0d3278f488b..e9381e709f226 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js @@ -732,7 +732,7 @@ export function isInterleavedUpdate(fiber: Fiber, lane: Lane) { // defensive coding measure in case a new update comes in between when // rendering has finished and when the interleaved updates are transferred // to the main queue. - hasInterleavedUpdates() !== null) && + hasInterleavedUpdates()) && (fiber.mode & ConcurrentMode) !== NoMode && // If this is a render phase update (i.e. UNSAFE_componentWillReceiveProps), // then don't treat this as an interleaved update. This pattern is diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js index 7dbbc9b25f9a7..5d25610f5f4a8 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js @@ -732,7 +732,7 @@ export function isInterleavedUpdate(fiber: Fiber, lane: Lane) { // defensive coding measure in case a new update comes in between when // rendering has finished and when the interleaved updates are transferred // to the main queue. - hasInterleavedUpdates() !== null) && + hasInterleavedUpdates()) && (fiber.mode & ConcurrentMode) !== NoMode && // If this is a render phase update (i.e. UNSAFE_componentWillReceiveProps), // then don't treat this as an interleaved update. This pattern is