Skip to content

Commit

Permalink
Don't fixId of undefined doc
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoguchi committed Aug 13, 2012
1 parent c860e92 commit c0d9038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function createQueryCtor (racer) {
if (type === 'findOne' || type === 'one') {
return mongoAdapter.findOne(this._namespace, this._conds, opts, function (err, found) {
if (err) return promise.resolve(err);
fixId(found);
if (found) fixId(found);
promise.resolve(null, found);
});
}
Expand Down

0 comments on commit c0d9038

Please sign in to comment.