Khan / Khan/live-editor

Empty "while" statement causes crash

Open
#736 1 comment 0 reactions 0 assignees View on GitHub
bug webpage
Dominant language
JavaScript
Stars
776
Forks
180
PR merge metrics
No merged PRs in 30d

Description

An empty while statement crashes with the completely useless "Something's wrong with the HTML but we're not sure what" message in the webpage environment. The PJS environment crashes too, but it at least gives a line number and an explanation.

To Reproduce:
```js
var i = 10;
while(--i);
```

Expected Behavior:
It should just work. This is valid Javascript. Or if the more "standard" syntax is desired, it should give a line number pointing to the problem.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the JavaScript reproduction `var i = 10; while(--i);` in both the webpage and PJS environments, then compare their crash and diagnostic behavior. The issue is done when the valid empty while statement runs correctly, or when an intentional rejection reports a useful line number and explanation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.