We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a744d10 commit 676b088Copy full SHA for 676b088
1 file changed
src/js/_enqueues/vendor/codemirror/fakejshint.js
@@ -2,7 +2,7 @@
2
// Based on https://github.com/jquery/esprima/blob/gh-pages/demo/validate.js which is MIT licensed
3
4
var fakeJSHINT = new function() {
5
- var syntax, errors;
+ var syntax;
6
var that = this;
7
this.data = [];
8
this.convertError = function( error ){
@@ -20,15 +20,7 @@ var fakeJSHINT = new function() {
20
loc: true,
21
sourceType: 'module'
22
});
23
- errors = syntax.errors;
24
- if ( errors && errors.length > 0 ) {
25
- for ( var i = 0; i < errors.length; i++) {
26
- var error = errors[i];
27
- that.data.push( that.convertError( error ) );
28
- }
29
- } else {
30
- that.data = [];
31
+ that.data = [];
32
} catch (e) {
33
that.data.push( that.convertError( e ) );
34
}
0 commit comments