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:
commit
a977fe1fba
|
@ -469,6 +469,7 @@ DataAccessObject.findOne = function findOne(params, cb) {
|
||||||
cb = params;
|
cb = params;
|
||||||
params = {};
|
params = {};
|
||||||
}
|
}
|
||||||
|
params = params || {};
|
||||||
params.limit = 1;
|
params.limit = 1;
|
||||||
this.find(params, function (err, collection) {
|
this.find(params, function (err, collection) {
|
||||||
if (err || !collection || !collection.length > 0) return cb(err, null);
|
if (err || !collection || !collection.length > 0) return cb(err, null);
|
||||||
|
|
Loading…
Reference in New Issue