react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

Wrong client detection in example

Open steida opened this issue 1 year ago • 0 comments
trafficstars

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.

steida avatar Dec 14 '23 21:12 steida