Skip to content

Fix config being ignored when fetcher is null #1311

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

Merged
merged 3 commits into from
Jul 30, 2021
Merged

Fix config being ignored when fetcher is null #1311

merged 3 commits into from
Jul 30, 2021

Conversation

shuding
Copy link
Member

@shuding shuding commented Jul 29, 2021

When args[1] is null, typeof args[1] will still be "object" which causes this bug.

Fixes #1274.

@shuding shuding requested a review from huozhi as a code owner July 29, 2021 14:08
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 29, 2021

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 dc09623:

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

@huozhi
Copy link
Member

huozhi commented Jul 29, 2021

Maybe add a unit test for this helper?

@shuding shuding merged commit da7f6f6 into master Jul 30, 2021
@shuding shuding deleted the fix-normalize branch July 30, 2021 13:25
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.

swr/infinite behaves weirdly without specifing fetcher function
2 participants