Skip to content

Commit 04e2904

Browse files
authored
Merge pull request #193 from atomic-state/fixes/prod-errors
fix(prod errors):
2 parents f594fa2 + 6d7f20e commit 04e2904

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "http-react",
3-
"version": "3.6.3",
3+
"version": "3.6.4",
44
"description": "React hooks for data fetching",
55
"main": "dist/index.js",
66
"scripts": {

src/hooks/use-fetch.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,8 @@ export function useFetch<FetchDataType = any, BodyType = any>(
660660
// @ts-ignore - 'data' is priority because 'fetcher' can return it
661661
const incoming = json?.['data'] ?? (await (resolver as any)(json))
662662

663-
const actionError =
664-
// @ts-ignore Errors could be returned
665-
fetcher?.name === 'proxied' ? json?.['error'] : undefined
663+
// @ts-expect-error
664+
const actionError = json?.['error']
666665

667666
const _data = isFunction(middleware)
668667
? await middleware!(incoming as any, thisCache)

0 commit comments

Comments
 (0)