Empty "while" statement causes crash
- 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