Skip to content

Commit d89c871

Browse files
committed
fix lint
1 parent d76e2e4 commit d89c871

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,8 +2215,9 @@ 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 =
2219+
offscreenFiber.alternate !== null &&
2220+
offscreenFiber.alternate.memoizedState !== null;
22202221
if (!wasHidden) {
22212222
// TODO: Move to passive phase
22222223
markCommitTimeOfFallback();

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,8 +2215,9 @@ 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 =
2219+
offscreenFiber.alternate !== null &&
2220+
offscreenFiber.alternate.memoizedState !== null;
22202221
if (!wasHidden) {
22212222
// TODO: Move to passive phase
22222223
markCommitTimeOfFallback();

0 commit comments

Comments
 (0)