Skip to content

Commit be6e198

Browse files
committed
Fix bad transpilation of set iteration breaking invalidation
1 parent 9beabae commit be6e198

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/query/core/buildMiddleware.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ export function buildMiddleware<
242242
}
243243

244244
context.batch(() => {
245-
for (const queryCacheKey of toInvalidate.values()) {
245+
const valuesArray = Array.from(toInvalidate.values())
246+
for (const queryCacheKey of valuesArray) {
246247
const querySubState = state.queries[queryCacheKey]
247248
const subscriptionSubState = state.subscriptions[queryCacheKey]
248249
if (querySubState && subscriptionSubState) {

0 commit comments

Comments
 (0)