tanstack-cacher 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -272,6 +272,10 @@ var QueryCacheManager = class {
|
|
|
272
272
|
try {
|
|
273
273
|
this.config.queryClient.setQueryData(this.config.queryKey, (oldData) => {
|
|
274
274
|
if (!oldData) return oldData;
|
|
275
|
+
if (!updater) {
|
|
276
|
+
this.invalidate();
|
|
277
|
+
return oldData;
|
|
278
|
+
}
|
|
275
279
|
const current = getAtPath(oldData, path, []);
|
|
276
280
|
const safeCurrent = Array.isArray(current) ? current : [];
|
|
277
281
|
let updatedItems;
|
package/package.json
CHANGED