From 7ad9806d114bea575300394e84a1bb4ef2b4a329 Mon Sep 17 00:00:00 2001 From: Brandon Dail Date: Mon, 14 Jan 2019 17:39:27 -0800 Subject: [PATCH] Tweak to avoid property read (#14593) --- packages/react-reconciler/src/ReactFiberUnwindWork.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberUnwindWork.js b/packages/react-reconciler/src/ReactFiberUnwindWork.js index f8c0b050f04a5..68cd4988f7f99 100644 --- a/packages/react-reconciler/src/ReactFiberUnwindWork.js +++ b/packages/react-reconciler/src/ReactFiberUnwindWork.js @@ -214,8 +214,9 @@ function throwException( // attach another listener to flip the boundary back to its normal state. const thenables: Set = (workInProgress.updateQueue: any); if (thenables === null) { - workInProgress.updateQueue = (new Set(): any); - workInProgress.updateQueue.add(thenable); + const updateQueue = (new Set(): any); + updateQueue.add(thenable); + workInProgress.updateQueue = updateQueue; } else { thenables.add(thenable); }