Skip to content

Commit 2ca48e8

Browse files
committed
Add null check for memoizedProps
1 parent 3c71140 commit 2ca48e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2801,7 +2801,7 @@ function commitMutationEffectsOnFiber(
28012801
}
28022802

28032803
// Offscreen with manual mode manages visibility manually.
2804-
if (supportsMutation && finishedWork.memoizedProps.mode !== 'manual') {
2804+
if (supportsMutation && finishedWork.pendingProps.mode !== 'manual') {
28052805
// TODO: This needs to run whenever there's an insertion or update
28062806
// inside a hidden Offscreen tree.
28072807
hideOrUnhideAllChildren(offscreenBoundary, isHidden);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2801,7 +2801,7 @@ function commitMutationEffectsOnFiber(
28012801
}
28022802

28032803
// Offscreen with manual mode manages visibility manually.
2804-
if (supportsMutation && finishedWork.memoizedProps.mode !== 'manual') {
2804+
if (supportsMutation && finishedWork.pendingProps.mode !== 'manual') {
28052805
// TODO: This needs to run whenever there's an insertion or update
28062806
// inside a hidden Offscreen tree.
28072807
hideOrUnhideAllChildren(offscreenBoundary, isHidden);

0 commit comments

Comments
 (0)