Skip to content

Commit

Permalink
Add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy-SC committed Oct 11, 2022
1 parent 4083f2f commit a258012
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/react-reconciler/src/ReactFiberCompleteWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ if (supportsMutation) {
child.return = node;
}
// If Offscreen is not in manual mode, detached tree is hidden from user space.
const _needsVisibilityToggle = node.memoizedProps.mode !== 'manual';
const _needsVisibilityToggle =
node.memoizedProps === null || node.memoizedProps.mode !== 'manual';
appendAllChildrenToContainer(
containerChildSet,
node,
Expand Down
3 changes: 2 additions & 1 deletion packages/react-reconciler/src/ReactFiberCompleteWork.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ if (supportsMutation) {
child.return = node;
}
// If Offscreen is not in manual mode, detached tree is hidden from user space.
const _needsVisibilityToggle = node.memoizedProps.mode !== 'manual';
const _needsVisibilityToggle =
node.memoizedProps === null || node.memoizedProps.mode !== 'manual';
appendAllChildrenToContainer(
containerChildSet,
node,
Expand Down

0 comments on commit a258012

Please sign in to comment.