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
Playground on site not catching invalid Javascript expressions error #1772
Comments
Adding
|
|
I added a wrapper that specifically catches and offers recovery for codemirror errors mdx/docs/_component/editor.client.js Lines 88 to 90 in f97ec00
To catch errors from invalid MDX/JS being run, we'd need to add another ErrorBoundary a few layers up wrapping mdx/docs/_component/editor.client.js Line 103 in f97ec00
and figure out what a good error recovery mechanism/UI would look like there. |
I think this is solved? #1791 (comment) |
This isn't solved, editor doesn't have a mechanism to catch invalid expressions. #1791 is related to codemirror state not being in sync with the application state |
ah, right, thanks! |
Closes GH-1772. Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com> Reviewed-by: Titus Wormer <tituswormer@gmail.com>
Subject of the issue
Great Job on the v2 rc release! Noticed a minor bug with error catching on the new Playground page for the new Javascript expressions support.
Your environment
Steps to reproduce
Invalid JSX Errors are caught correctly by the Compile tab:
Errors are NOT caught by the Compile tab when when using the new Javascript expressions syntax {...].
The page crashes from the error, error from chrome console:
Expected behaviour
Errors within Javascript expressions {...} should caught by the Playground Console tab like JSX syntax error.
Actual behaviour
The page crashes from the error, force you to refresh Playground.
The text was updated successfully, but these errors were encountered: