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

Wrong client detection in example #6489

Closed
steida opened this issue Dec 14, 2023 · 1 comment
Closed

Wrong client detection in example #6489

steida opened this issue Dec 14, 2023 · 1 comment

Comments

@steida
Copy link

steida commented Dec 14, 2023

This:

if (typeof window === 'undefined') {
    throw Error('Chat should only render on the client.');
  }

Should be this:

if (typeof document === 'undefined') {
    throw Error('Chat should only render on the client.');
  }

Because Deno has window object.

@rickhanlonii
Copy link
Member

Deno 2.0 is removing window because this pattern is way too prevalent denoland/deno#22057

@rickhanlonii rickhanlonii closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2024
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

No branches or pull requests

2 participants