Skip to content

Commit d14888a

Browse files
committed
[javascript mode] Fix bug in object literal spread parsing
Closes codemirror#5036
1 parent 42a2632 commit d14888a

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
@@ -514,7 +514,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
514514
} else if (type == "[") {
515515
return cont(expression, expect("]"), afterprop);
516516
} else if (type == "spread") {
517-
return cont(expression, afterprop);
517+
return cont(expressionNoComma, afterprop);
518518
} else if (value == "*") {
519519
cx.marked = "keyword";
520520
return cont(objprop);

0 commit comments

Comments
 (0)