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(@toss/utils): Add 'Deno' in globalThis for isServer() #447

Merged
merged 4 commits into from
Mar 22, 2024

Conversation

saul-atomrigs
Copy link
Contributor

Overview

This PR makes two changes:

  1. Removed typeof global !== 'undefined' according to this issue and this conversation
  2. Added 'Deno' in globalThis;. Tanstack/query and vercel/swr now use this checking for isServer. And we should use globalThis instead of window because it became deprecated in Deno.

PR Checklist

  • [✅] I read and included theses actions below
  1. I have read the Contributing Guide
  2. I have written documents and tests, if needed.

Copy link

netlify bot commented Mar 22, 2024

Deploy Preview for slash-libraries ready!

Name Link
🔨 Latest commit 91010a2
🔍 Latest deploy log https://app.netlify.com/sites/slash-libraries/deploys/65fd3fd2895f7e0008fa8acf
😎 Deploy Preview https://deploy-preview-447--slash-libraries.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@saul-atomrigs saul-atomrigs changed the title Feat/deno in globalthis isserver feat(@toss/utils): Add 'Deno' in globalThis for isServer() Mar 22, 2024
@raon0211 raon0211 changed the title feat(@toss/utils): Add 'Deno' in globalThis for isServer() fix(@toss/utils): Add 'Deno' in globalThis for isServer() Mar 22, 2024
Copy link
Collaborator

@raon0211 raon0211 left a comment

Choose a reason for hiding this comment

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

This looks nice, thanks for your contribution! I wonder why we have global check in our isServer() call.

@raon0211 raon0211 merged commit 798e2dc into toss:main Mar 22, 2024
9 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