question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Playground on site not catching invalid Javascript expressions error

See original GitHub issue

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:

Hello, world!
Below is an example of markdown in JSX.

</div>

image

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:

image

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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
aquamarinecxcommented, Dec 30, 2021

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

0reactions
wooormcommented, Dec 30, 2021

ah, right, thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found