Skip to content

Commit

Permalink
Ensure cache.{evict,modify} not wrapped more than once.
Browse files Browse the repository at this point in the history
Fixes a regression introduced by PR #6898.
  • Loading branch information
benjamn committed Aug 28, 2020
1 parent 95d2a75 commit 1a601d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/QueryInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export class QueryInfo {
// is a bit of a hack, but it saves us from having to make eviction
// counting an official part of the ApolloCache API.
if (!destructiveMethodCounts.has(cache)) {
destructiveMethodCounts.set(cache, 0);
wrapDestructiveCacheMethod(cache, "evict");
wrapDestructiveCacheMethod(cache, "modify");
}
Expand Down

0 comments on commit 1a601d8

Please sign in to comment.