Merge pull request #13 from strongloop/master

Cherry-pick two critical fixes from master to strongloop-suite-1.0 release
This commit is contained in:
Raymond Feng 2013-09-09 11:00:57 -07:00
commit a977fe1fba
1 changed files with 1 additions and 0 deletions

View File

@ -469,6 +469,7 @@ DataAccessObject.findOne = function findOne(params, cb) {
cb = params;
params = {};
}
params = params || {};
params.limit = 1;
this.find(params, function (err, collection) {
if (err || !collection || !collection.length > 0) return cb(err, null);