Skip to content

Commit

Permalink
reset stale unmountedRef
Browse files Browse the repository at this point in the history
  • Loading branch information
promer94 committed Feb 6, 2022
1 parent 3b01d69 commit 574cb2d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/use-swr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ export const useSWRHandler = <Data = any, Error = any>(
// Always update fetcher and config refs even with the Suspense mode.
fetcherRef.current = fetcher
configRef.current = config
unmountedRef.current = false
throw isUndefined(error) ? revalidate(WITH_DEDUPE) : error
}

Expand Down

0 comments on commit 574cb2d

Please sign in to comment.