Skip to content

Commit

Permalink
build: no emit on error (#1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi authored Sep 10, 2021
1 parent c00f0b4 commit e284a56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/use-swr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export const useSWRHandler = <Data = any, Error = any>(
// Keep the stale data but update error.
setState({
isValidating: false,
error: err
error: err as Error
})
if (!shouldDedupe) {
// Broadcast to update the states of other hooks.
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"strict": true,
"target": "es5",
"baseUrl": ".",
"noEmitOnError": true,
"paths": {
"swr": ["./src/index.ts"],
"swr/infinite": ["./infinite/index.ts"],
Expand Down

0 comments on commit e284a56

Please sign in to comment.