Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sunderls committed Apr 9, 2022
1 parent d76e2e4 commit 345b90f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/react-reconciler/src/ReactFiberCommitWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -2215,8 +2215,7 @@ function commitMutationEffectsOnFiber(
const newState: OffscreenState | null = offscreenFiber.memoizedState;
const isHidden = newState !== null;
if (isHidden) {
const current = offscreenFiber.alternate;
const wasHidden = current !== null && current.memoizedState !== null;
const wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;
if (!wasHidden) {
// TODO: Move to passive phase
markCommitTimeOfFallback();
Expand Down
3 changes: 1 addition & 2 deletions packages/react-reconciler/src/ReactFiberCommitWork.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -2215,8 +2215,7 @@ function commitMutationEffectsOnFiber(
const newState: OffscreenState | null = offscreenFiber.memoizedState;
const isHidden = newState !== null;
if (isHidden) {
const current = offscreenFiber.alternate;
const wasHidden = current !== null && current.memoizedState !== null;
const wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;
if (!wasHidden) {
// TODO: Move to passive phase
markCommitTimeOfFallback();
Expand Down

0 comments on commit 345b90f

Please sign in to comment.