Skip to content
Browse files

added check for ids.length

  • Loading branch information...
1 parent b1fd773 commit d553c6f674b3b014841ffc319484d8a133bba0d2 @mkuklis mkuklis committed Oct 9, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/retrieve.js
View
1 lib/retrieve.js
@@ -77,6 +77,7 @@ exports.findAndLoad = function findAndLoad(searches, callback) {
var self = this;
this.find(searches, function (err, ids) {
if (err) callback(err, ids);
+ if (ids.length == 0) callback("not found", ids);
if (ids.length > 0) {
async.map(ids, function (id, callback) {
self.load(id, function (err, props) {

0 comments on commit d553c6f

Please sign in to comment.
Something went wrong with that request. Please try again.