Skip to content

Commit f0669de

Browse files
author
Brian Vaughn
committed
Initialize deletions array to null
1 parent caeab4c commit f0669de

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function FiberNode(
145145
// Effects
146146
this.effectTag = NoEffect;
147147
this.subtreeTag = NoEffect;
148-
this.deletions = [];
148+
this.deletions = null;
149149
this.nextEffect = null;
150150

151151
this.firstEffect = null;
@@ -290,7 +290,7 @@ export function createWorkInProgress(current: Fiber, pendingProps: any): Fiber {
290290
// Reset the effect tag.
291291
workInProgress.effectTag = NoEffect;
292292
workInProgress.subtreeTag = NoEffect;
293-
workInProgress.deletions = [];
293+
workInProgress.deletions = null;
294294

295295
// The effect list is no longer valid.
296296
workInProgress.nextEffect = null;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,11 +2138,11 @@ function updateSuspenseFallbackChildren(
21382138
workInProgress.firstEffect = primaryChildFragment.firstEffect;
21392139
workInProgress.lastEffect = progressedLastEffect;
21402140
progressedLastEffect.nextEffect = null;
2141-
workInProgress.deletions = [];
2141+
workInProgress.deletions = null;
21422142
} else {
21432143
// TODO: Reset this somewhere else? Lol legacy mode is so weird.
21442144
workInProgress.firstEffect = workInProgress.lastEffect = null;
2145-
workInProgress.deletions = [];
2145+
workInProgress.deletions = null;
21462146
}
21472147
} else {
21482148
primaryChildFragment = createWorkInProgressOffscreenFiber(

0 commit comments

Comments
 (0)