From f72fd8fbe2c6036b5ffc3859f0643e93ee1dcc55 Mon Sep 17 00:00:00 2001 From: danybeltran Date: Sat, 6 Jul 2024 09:44:14 -0600 Subject: [PATCH] fix(useFetch): Fixes updates now being pushed because of misspelled constant --- package.json | 2 +- src/hooks/use-fetch.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0f58eae..d1e8d5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "http-react", - "version": "3.6.1", + "version": "3.6.2", "description": "React hooks for data fetching", "main": "dist/index.js", "scripts": { diff --git a/src/hooks/use-fetch.ts b/src/hooks/use-fetch.ts index eae6472..6deb2ed 100644 --- a/src/hooks/use-fetch.ts +++ b/src/hooks/use-fetch.ts @@ -1000,7 +1000,7 @@ export function useFetch( if (!willSuspend.get(resolvedKey)) { queue(() => { if (inDeps('data')) { - if (isDefined(data)) { + if (isDefined($data)) { if (!jsonCompare(data, cacheProvider.get(resolvedDataKey))) { setData(cacheProvider.get(resolvedKey)) }