Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: use count to instead of result[0]['COUNT(0)']
  • Loading branch information
XadillaX committed Jan 19, 2016
1 parent 22ec1c2 commit c335b84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/query.js
Expand Up @@ -719,8 +719,8 @@ Query.prototype.count = function(callback) {
count = parseInt(result[0]["COUNT(0)"]) || 0;
}

callback(undefined, result[0]["COUNT(0)"]);
promisor._onExecuteResult(undefined, result[0]["COUNT(0)"]);
callback(undefined, count);
promisor._onExecuteResult(undefined, count);
});

return promisor;
Expand Down

0 comments on commit c335b84

Please sign in to comment.