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

Setting window.event to null breaks upgrade to React 18 #1201

Open
seriouslag opened this issue Aug 3, 2023 · 0 comments
Open

Setting window.event to null breaks upgrade to React 18 #1201

seriouslag opened this issue Aug 3, 2023 · 0 comments

Comments

@seriouslag
Copy link
Contributor

seriouslag commented Aug 3, 2023

https://github.com/Tradeshift/tradeshift-ui/blame/48bac477deccedcb30901d4ec2ab7d6351d65506/src/spiritual/spiritual-edbml/edbml%40wunderbyte.com/module.js#L96

When left as is react 18 will fail to render the app as React expects a falsey value of window.event to only ever equal undefined and not null.

https://github.com/facebook/react/blob/493f72b0a7111b601c16b8ad8bc2649d82c184a0/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js#L592

Setting window.event to undefined instead of null resolves this issue.

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

1 participant