diff --git a/src/Squawk.ts b/src/Squawk.ts index 44f35fd..612c440 100644 --- a/src/Squawk.ts +++ b/src/Squawk.ts @@ -283,7 +283,9 @@ export default function createStore(initialState: Required, useReduxDevToo // Invoke all unique subscribers with the new pending states if (pendingSubscribersInternal.size > 0) { const currentPendingState = pendingState.get(); - pendingSubscribersInternal.forEach((subscriber) => subscriber(currentPendingState)); + for (const subscriber of pendingSubscribersInternal) { + subscriber(currentPendingState); + } } }, /** Sets up a subscription for a single global state context */