Skip to content

Commit 236b40f

Browse files
Michal Kapiczynskimarijnh
authored andcommitted
[javascript-lint] JSHINT backward compatibility - Setting error severity to error by default when there is no error.code property (codemirror#5260)
1 parent 95e9edf commit 236b40f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addon/lint/javascript-lint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
// Convert to format expected by validation service
5252
var hint = {
5353
message: error.reason,
54-
severity: error.code.startsWith('W') ? "warning" : "error",
54+
severity: error.code ? (error.code.startsWith('W') ? "warning" : "error") : "error",
5555
from: CodeMirror.Pos(error.line - 1, start),
5656
to: CodeMirror.Pos(error.line - 1, end)
5757
};

0 commit comments

Comments
 (0)