Skip to content

Commit 5c4f7a6

Browse files
committed
[javascript mode] Fix another hang in TS object type parsing
Closes #6571
1 parent 126a266 commit 5c4f7a6

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
@@ -624,7 +624,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
624624
if (type == "=>") return cont(typeexpr)
625625
}
626626
function typeprops(type) {
627-
if (type == "}") return cont()
627+
if (type.match(/[\}\)\]]/)) return cont()
628628
if (type == "," || type == ";") return cont(typeprops)
629629
return pass(typeprop, typeprops)
630630
}

0 commit comments

Comments
 (0)