Skip to content

Commit 345b90f

Browse files
committed
fix lint
1 parent d76e2e4 commit 345b90f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,8 +2215,7 @@ function commitMutationEffectsOnFiber(
22152215
const newState: OffscreenState | null = offscreenFiber.memoizedState;
22162216
const isHidden = newState !== null;
22172217
if (isHidden) {
2218-
const current = offscreenFiber.alternate;
2219-
const wasHidden = current !== null && current.memoizedState !== null;
2218+
const wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;
22202219
if (!wasHidden) {
22212220
// TODO: Move to passive phase
22222221
markCommitTimeOfFallback();

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,8 +2215,7 @@ function commitMutationEffectsOnFiber(
22152215
const newState: OffscreenState | null = offscreenFiber.memoizedState;
22162216
const isHidden = newState !== null;
22172217
if (isHidden) {
2218-
const current = offscreenFiber.alternate;
2219-
const wasHidden = current !== null && current.memoizedState !== null;
2218+
const wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;
22202219
if (!wasHidden) {
22212220
// TODO: Move to passive phase
22222221
markCommitTimeOfFallback();

0 commit comments

Comments
 (0)