Skip to content
New issue

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

fix: Do not override falsy (null) fetcher #2245

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

koba04
Copy link
Collaborator

@koba04 koba04 commented Nov 20, 2022

Fixes #2155 and an alternative of #2240

This changes to use the fetcher argument rather than overriding by config.fetcher even if the argument is null.
config.fetcher is still used when the fetcher argument is undefined.

undefined is already allowed in fetcher, so it doesn't widen the type definition.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 20, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 417f67e:

Sandbox Source
SWR-Basic Configuration
SWR-States Configuration
SWR-Infinite Configuration
SWR-SSR Configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UseSWR wrapper doesnt override and routes to the wrong fetcher (SWR global config's)
1 participant