Tweak to avoid property read (#14593)
Brandon Dail committed
Jan 14, 2019 at 17:39 UTC
7ad9806d114bea575300394e84a1bb4ef2b4a329
1 file changed
+3
-2
packages/react-reconciler/src/ReactFiberUnwindWork.js
+3
-2
@@ -214,8 +214,9 @@ function throwException(
214
// attach another listener to flip the boundary back to its normal state.
215
const thenables: Set<Thenable> = (workInProgress.updateQueue: any);
216
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;
220
} else {
221
thenables.add(thenable);
222
}