Skip to content

Commit fc210f8

Browse files
committed
Only treat updates to lazy as a new mount in legacy mode
1 parent d20c3af commit fc210f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,7 @@ function mountIndeterminateComponent(
16351635
Component,
16361636
renderLanes,
16371637
) {
1638-
if (_current !== null) {
1638+
if (_current !== null && (workInProgress.mode & ConcurrentMode) === NoMode) {
16391639
// An indeterminate component only mounts if it suspended inside a non-
16401640
// concurrent tree, in an inconsistent state. We want to treat it like
16411641
// a new mount, even though an empty version of it already committed.

packages/react-reconciler/src/ReactFiberBeginWork.old.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,7 @@ function mountIndeterminateComponent(
16351635
Component,
16361636
renderLanes,
16371637
) {
1638-
if (_current !== null) {
1638+
if (_current !== null && (workInProgress.mode & ConcurrentMode) === NoMode) {
16391639
// An indeterminate component only mounts if it suspended inside a non-
16401640
// concurrent tree, in an inconsistent state. We want to treat it like
16411641
// a new mount, even though an empty version of it already committed.

0 commit comments

Comments
 (0)