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

typeof window !== 'undefined' to test for client #1730

Merged
merged 2 commits into from
Apr 5, 2022
Merged

typeof window !== 'undefined' to test for client #1730

merged 2 commits into from
Apr 5, 2022

Conversation

tianhuil
Copy link
Contributor

@tianhuil tianhuil commented Apr 5, 2022

Since process.browser is deprecated, the recommended workaround for determining if we are on the client or server on nextjs is typeof window !== 'undefined':
vercel/next.js#5354 (comment)

Thanks for quickly accepting this @KATT! 🙏

Since `process.browser` is deprecated, the recommended workaround for determining if we are on the client or server on nextjs is `typeof window !== 'undefined'`:
vercel/next.js#5354 (comment)
@vercel
Copy link

vercel bot commented Apr 5, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

www – ./www

🔍 Inspect: https://vercel.com/trpc/www/FY83FmU9mMVCMesBdSfwT6H5Ryfh
✅ Preview: https://www-git-patch-1-trpc.vercel.app

next-prisma-starter – ./examples/next-prisma-starter

🔍 Inspect: https://vercel.com/trpc/next-prisma-starter/ALj5AfUGEhfNmzdyxtdKvT7w69XW
✅ Preview: https://next-prisma-starter-git-patch-1-trpc.vercel.app

@KATT
Copy link
Member

KATT commented Apr 5, 2022

Thanks!

@KATT KATT merged commit 042d662 into main Apr 5, 2022
@KATT KATT deleted the patch-1 branch April 5, 2022 17:07
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

This pull request has been locked because it had no new activity for 30 days. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants