Playground on site not catching invalid Javascript expressions error
See original GitHub issueSubject 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
- OS: Window 10
- Packages: 2.0.0-rc.1 on https://v2.mdxjs.com/playground/
- Env: Chrome
Steps to reproduce
Invalid JSX Errors are caught correctly by the Compile tab:
Hello, world!
Below is an example of markdown in JSX.
</div>
Errors are NOT caught by the Compile tab when when using the new Javascript expressions syntax {…].
Hello, world!
Below is an example of markdown in JSX.
{r}
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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Getting "error: invalid regular expression" - Stack Overflow
This means that the javascript string "\\" will produce the following content : \ . But that single \ is a escape character...
Read more >Troubleshooting MDX
This article goes through several common problems and errors that might occur when using MDX.
Read more >TS Playground - An online editor for exploring TypeScript and ...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
Read more >Async/Await Error Handling - Beginner JavaScript - Wes Bos
Because there is no .then() that we are chaining on with promises, it's not as easy as just chaining a .catch() onto the...
Read more >JavaScript - MDN Web Docs - Mozilla
JavaScript is a prototype-based, multi-paradigm, single-threaded, ... Do not confuse JavaScript with the Java programming language ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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!