Skip to content

clean code #1145

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 1 commit into from
Apr 27, 2021
Merged

clean code #1145

merged 1 commit into from
Apr 27, 2021

Conversation

MoonBall
Copy link
Contributor

@MoonBall MoonBall commented Apr 26, 2021

Clean code since key is ensured to be true.

swr/src/use-swr.ts

Lines 63 to 67 in f787624

if (!key) return Promise.resolve()
const updaters = CACHE_REVALIDATORS[key]
if (key && updaters) {

@codesandbox-ci
Copy link

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

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

@shuding shuding merged commit 110096f into vercel:master Apr 27, 2021
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.

4 participants