Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Suggestions now get assigned properly within the Result object

  • Loading branch information...
commit e1b2537b586b71928f2b9a308b6396dd388bb7c5 1 parent 87be71a
@tstone authored
Showing with 3 additions and 3 deletions.
  1. +2 −1  src/checker.js
  2. +1 −2  src/result.js
View
3  src/checker.js
@@ -31,7 +31,8 @@ Checker.prototype.check = function(s, callback){
} else {
var parser = new xml2js.Parser({ attrkey: 'attrs', charkey: 'chars' });
parser.parseString(body, function(err, result){
- if (typeof callback === 'function') { callback(undefined, new Result(result, text, this.config)); }
+ var r = new Result(result, text, this.config);
+ if (typeof callback === 'function') { callback(undefined, r); }
}.bind(this));
}
}.bind(this));
View
3  src/result.js
@@ -17,7 +17,6 @@ var Result = function(base, source, config) { this.__init(base, source, config);
} else {
this.suggestions = [];
}
-
};
cls.__parseSuggestions = function(xs){
@@ -43,7 +42,7 @@ var Result = function(base, source, config) { this.__init(base, source, config);
};
Array.isArray(xs) ? xs.forEach(addSug) : addSug(xs);
- this.suggestions = suggestions;
+ return suggestions;
};
Please sign in to comment.
Something went wrong with that request. Please try again.