Skip to content

Commit

Permalink
Fix bad transpilation of set iteration breaking invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Apr 26, 2021
1 parent 9beabae commit be6e198
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/query/core/buildMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ export function buildMiddleware<
}

context.batch(() => {
for (const queryCacheKey of toInvalidate.values()) {
const valuesArray = Array.from(toInvalidate.values())
for (const queryCacheKey of valuesArray) {
const querySubState = state.queries[queryCacheKey]
const subscriptionSubState = state.subscriptions[queryCacheKey]
if (querySubState && subscriptionSubState) {
Expand Down

0 comments on commit be6e198

Please sign in to comment.