From e167e8b5fa9056ae92e8cece3d17b90675fe9449 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Wed, 1 Jul 2020 16:44:21 -0600 Subject: [PATCH] fix: queries without a query key are not added to cache --- src/core/queryCache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/queryCache.js b/src/core/queryCache.js index 4f85deec8b..c3f46d3633 100644 --- a/src/core/queryCache.js +++ b/src/core/queryCache.js @@ -168,7 +168,7 @@ export function makeQueryCache({ frozen = isServer, defaultConfig } = {}) { query.scheduleGarbageCollection() } - if (!frozen) { + if (!frozen && queryHash) { queryCache.queries[queryHash] = query if (isServer) {