We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error will occur if the fallback option for useSWR is undefined.
const { data, error } = useSWR("/api/hello", { fallback: undefined });
fallback option can be specified as undefined in the type definition. The above code causes the following error.
TypeError: Cannot read properties of undefined (reading '/api/hello')
I think fallback option should check if it is undefined. (For example, here)
CodeSandbox
SWR version. 2.2.5 Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug report
Description / Observed Behavior
An error will occur if the fallback option for useSWR is undefined.
fallback option can be specified as undefined in the type definition.
The above code causes the following error.
Expected Behavior
I think fallback option should check if it is undefined.
(For example, here)
Repro Steps / Code Example
CodeSandbox
Additional Context
SWR version. 2.2.5
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: