Skip to content

Commit 90209f8

Browse files
committed
[javascript mode] Handle non-typical for-initializers properly
Closes #1418
1 parent 28b85ee commit 90209f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/javascript/javascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
358358
if (type == "var") return cont(vardef1, expect(";"), forspec2);
359359
if (type == ";") return cont(forspec2);
360360
if (type == "variable") return cont(formaybein);
361-
return cont(forspec2);
361+
return pass(expression, expect(";"), forspec2);
362362
}
363363
function formaybein(_type, value) {
364364
if (value == "in") return cont(expression);

0 commit comments

Comments
 (0)