Skip to content

Commit 7ad9806

Browse files
authored
Tweak to avoid property read (#14593)
1 parent 0fc1547 commit 7ad9806

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-reconciler/src/ReactFiberUnwindWork.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,9 @@ function throwException(
214214
// attach another listener to flip the boundary back to its normal state.
215215
const thenables: Set<Thenable> = (workInProgress.updateQueue: any);
216216
if (thenables === null) {
217-
workInProgress.updateQueue = (new Set(): any);
218-
workInProgress.updateQueue.add(thenable);
217+
const updateQueue = (new Set(): any);
218+
updateQueue.add(thenable);
219+
workInProgress.updateQueue = updateQueue;
219220
} else {
220221
thenables.add(thenable);
221222
}

0 commit comments

Comments
 (0)