Skip to content

Commit a18d9f7

Browse files
committed
[json-lint addon] Fix broken use of var declaration
Closes #5400
1 parent efbaa4f commit a18d9f7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

addon/lint/json-lint.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ CodeMirror.registerHelper("lint", "json", function(text) {
2525
}
2626
// for jsonlint's web dist jsonlint is exported as an object with a single property parser, of which parseError
2727
// is a subproperty
28-
if (window.jsonlint.parser) {
29-
var jsonlint = window.jsonlint.parser;
30-
}
28+
var jsonlint = window.jsonlint.parser || window.jsonlint
3129
jsonlint.parseError = function(str, hash) {
3230
var loc = hash.loc;
3331
found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),

0 commit comments

Comments
 (0)