Skip to content

Commit

Permalink
Fixes #204
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Jan 31, 2011
1 parent 37dbb3b commit 9ae95a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mongoose/model.js
Expand Up @@ -383,7 +383,8 @@ Model.castQuery = function (query) {

// Take care of special case of MongooseNumber,
// with resolves scalar via `valueOf`
if (ret[i][key].valueOf) ret[i][key] = ret[i][key].valueOf();
if (ret[i][key]._path)
ret[i][key] = ret[i][key].valueOf();
});
} else if (query[i].constructor == RegExp || Array.isArray(query[i]))
ret[i] = query[i];
Expand Down

0 comments on commit 9ae95a5

Please sign in to comment.