Skip to content

Commit

Permalink
backport #3643
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Sep 2, 2022
1 parent ae87b44 commit 176bd3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hooks/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let previousInternal;
/** @type {number} */
let currentHook = 0;

/** @type {Array<import('./internal').Component>} */
/** @type {Array<import('./internal').Internal>} */
let afterPaintEffects = [];

let EMPTY = [];
Expand Down Expand Up @@ -189,7 +189,6 @@ export function useReducer(reducer, initialState, init) {

return currentValue !== hookState._value[0];
};

}

return hookState._nextValue || hookState._value;
Expand Down Expand Up @@ -359,6 +358,7 @@ export function useErrorBoundary(cb) {
function flushAfterPaintEffects() {
let internal;
while ((internal = afterPaintEffects.shift())) {
if (!internal.data.__hooks) continue;
if (~internal.flags & MODE_UNMOUNTING) {
try {
internal.data.__hooks._pendingEffects.forEach(invokeCleanup);
Expand Down

0 comments on commit 176bd3c

Please sign in to comment.