Skip to content

Commit

Permalink
fix: trigger updates on untrack
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Feb 6, 2025
1 parent f9eeec1 commit 91e497a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/query-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ export const useQueryCache = /* @__PURE__ */ defineStore(QUERY_STORE_ID, ({ acti
if (!effect || !entry.deps.has(effect)) return

entry.deps.delete(effect)
triggerCache()

if (entry.deps.size > 0 || !entry.options) return
clearTimeout(entry.gcTimeout)
// avoid setting a timeout with false, Infinity or NaN
Expand Down

0 comments on commit 91e497a

Please sign in to comment.