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 #283: Verify valid element before rendering #288

Merged

Conversation

AaronPowell96
Copy link

https://github.com/FormidableLabs/react-live/issues/283

Add a React.isValidElement check before rendering to the live playground, preventing a full window crash when entering non-valid child objects such as console, window, document.

See the difference in changes below:
Before - https://www.loom.com/share/ba67749226a546129caa8cc7e33eae09
After - https://www.loom.com/share/0583ebbaaf6c4ccf8f69eaca1a35c9ad

resolves #283

@jpdriver
Copy link
Contributor

looks great! thanks so much for this @AaronPowell96

@jpdriver jpdriver merged commit cd481af into FormidableLabs:master Jan 18, 2022
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.

Typing console or window crashes the editor
2 participants