()
| 15015 | } |
| 15016 | } |
| 15017 | function resetHooksAfterThrow() { |
| 15018 | // We can assume the previous dispatcher is always this one, since we set it |
| 15019 | // at the beginning of the render phase and there's no re-entrancy. |
| 15020 | ReactCurrentDispatcher.current = ContextOnlyDispatcher; |
| 15021 | |
| 15022 | if (didScheduleRenderPhaseUpdate) { |
| 15023 | // There were render phase updates. These are only valid for this render |
| 15024 | // phase, which we are now aborting. Remove the updates from the queues so |
| 15025 | // they do not persist to the next render. Do not remove updates from hooks |
| 15026 | // that weren't processed. |
| 15027 | // |
| 15028 | // Only reset the updates from the queue if it has a clone. If it does |
| 15029 | // not have a clone, that means it wasn't processed, and the updates were |
| 15030 | // scheduled before we entered the render phase. |
| 15031 | var hook = currentlyRenderingFiber$1.memoizedState; |
| 15032 | |
| 15033 | while (hook !== null) { |
| 15034 | var queue = hook.queue; |
| 15035 | |
| 15036 | if (queue !== null) { |
| 15037 | queue.pending = null; |
| 15038 | } |
| 15039 | |
| 15040 | hook = hook.next; |
| 15041 | } |
| 15042 | } |
| 15043 | |
| 15044 | renderExpirationTime = NoWork; |
| 15045 | currentlyRenderingFiber$1 = null; |
| 15046 | currentHook = null; |
| 15047 | workInProgressHook = null; |
| 15048 | |
| 15049 | { |
| 15050 | hookTypesDev = null; |
| 15051 | hookTypesUpdateIndexDev = -1; |
| 15052 | currentHookNameInDev = null; |
| 15053 | } |
| 15054 | |
| 15055 | didScheduleRenderPhaseUpdate = false; |
| 15056 | } |
| 15057 | |
| 15058 | function mountWorkInProgressHook() { |
| 15059 | var hook = { |
no outgoing calls
no test coverage detected