Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@elrrrrrrr
Copy link
Contributor

@elrrrrrrr elrrrrrrr commented Jan 9, 2025

In the new version of swr (2.3.0), globalThis is used to determine if the environment is Deno. (#2915)

This will cause errors in lower version browser environments (android <=13) (ios <12) where globalThis does not exist.

Since swr is a widely used request library, we hope to ensure compatibility as much as possible.

In Deno 2, window has been removed, as discussed in this issue: denoland/deno#13367

I have added a new method isLegacyDeno for this check. 🙏🏻

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 9, 2025

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.

@huozhi huozhi changed the title fix: globalThis fix: sever env detection for deno Jan 10, 2025
@huozhi huozhi merged commit f521fb7 into vercel:main Jan 10, 2025
7 checks passed
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