Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
5 changes: 2 additions & 3 deletions src/hooks/use-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,8 @@ export function useFetch<FetchDataType = any, BodyType = any>(
// @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)
Expand Down