diff --git a/packages/toolkit/src/query/core/buildMiddleware/batchActions.ts b/packages/toolkit/src/query/core/buildMiddleware/batchActions.ts index 549ade7084..f3ce76d387 100644 --- a/packages/toolkit/src/query/core/buildMiddleware/batchActions.ts +++ b/packages/toolkit/src/query/core/buildMiddleware/batchActions.ts @@ -102,6 +102,11 @@ export const buildBatchedActionsHandler: InternalHandlerBuilder< ) } + if (api.util.resetApiState.match(action)) { + previousSubscriptions = internalState.currentSubscriptions = {} + return [true, false] + } + // Intercept requests by hooks to see if they're subscribed // Necessary because we delay updating store state to the end of the tick if (api.internalActions.internal_probeSubscription.match(action)) {