Permalink
Browse files

Refactor.

  • Loading branch information...
1 parent 3f86167 commit c689ba398b6d76a7784dbc2bb3c535c2e01b0008 @vesln committed Jan 21, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/bot.js
View
@@ -31,8 +31,7 @@ function Bot(db, defaults) {
* @api public
*/
Bot.prototype.answer = function(sentence, cb) {
- var text = new Text(sentence);
- var results = this._db.findAll(text);
+ var results = this._db.findAll(new Text(sentence));
if (!results.length) results = this._defaults;
return this.random(results);
};

0 comments on commit c689ba3

Please sign in to comment.