Skip to content

Commit 0342ad4

Browse files
committed
fix: correct Error handling according to typescript upgrade
1 parent 8045f55 commit 0342ad4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/use-dataloader/src/useDataLoader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ const useDataLoader = <T>(
129129

130130
await onSuccess?.(result)
131131
} catch (err) {
132-
dispatch(Actions.createOnError(err))
133-
await ((onError ?? onErrorProvider)?.(err))
132+
dispatch(Actions.createOnError(err as Error))
133+
await ((onError ?? onErrorProvider)?.(err as Error))
134134
}
135135
},
136136
[

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"noEmit": true,
34
"target": "esnext",
45
"lib": [
56
"DOM",

0 commit comments

Comments
 (0)