diff --git a/package.json b/package.json index e76b989..d99762e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "http-react", - "version": "3.6.3", + "version": "3.6.4", "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 a315e0a..c752721 100644 --- a/src/hooks/use-fetch.ts +++ b/src/hooks/use-fetch.ts @@ -660,9 +660,8 @@ export function useFetch( // @ts-ignore - 'data' is priority because 'fetcher' can return it const incoming = json?.['data'] ?? (await (resolver as any)(json)) - const actionError = - // @ts-ignore Errors could be returned - fetcher?.name === 'proxied' ? json?.['error'] : undefined + // @ts-expect-error + const actionError = json?.['error'] const _data = isFunction(middleware) ? await middleware!(incoming as any, thisCache)