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 d89c871
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/react-reconciler/src/ReactFiberCommitWork.new.js
Expand Up @@ -2215,8 +2215,9 @@ 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
5 changes: 3 additions & 2 deletions packages/react-reconciler/src/ReactFiberCommitWork.old.js
Expand Up @@ -2215,8 +2215,9 @@ 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 d89c871

Please sign in to comment.