Skip to content

fix: add server check back before calling rAF #899

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
Jan 13, 2021

Conversation

joakimgrr
Copy link
Contributor

Update from 0.2.3 to 0.3.0 would cause issues when running my Jest tests, it would report an undefined function. After some research, the function in question is rAF which is set to null in server environments.

Looking at the diff between 0.2.3 and 0.3.0 (0.2.3...0.3.0) there used to be a check for IS_SERVER but it was removed (rAF is named as rIC still in the diff).

Since im not that familiar with the project i'm not sure if this is meant to be like this or if adding back the IS_SERVER is okay, but i wanted to approach the issue via a PR rather than an issue.

@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 8277212:

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

Copy link
Member

@shuding shuding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change sounds good to me, thanks!

@shuding shuding merged commit 6891f89 into vercel:master Jan 13, 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.

2 participants