Skip to content

Commit

Permalink
fixed; regression in Query#count()
Browse files Browse the repository at this point in the history
closes #1542
  • Loading branch information
aheckmann committed Jul 26, 2013
1 parent da533e0 commit 274f9b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/query.js
Expand Up @@ -1635,6 +1635,8 @@ Query.prototype.findOne = function (callback) {

Query.prototype.count = function (callback) {
this.op = 'count';
if (!callback) return this;

var model = this.model;

try {
Expand Down

0 comments on commit 274f9b0

Please sign in to comment.