diff --git a/src/database/mongo/sorted.js b/src/database/mongo/sorted.js index 161ad56c17..069061679c 100644 --- a/src/database/mongo/sorted.js +++ b/src/database/mongo/sorted.js @@ -135,15 +135,15 @@ module.exports = function(db, module) { module.isSortedSetMembers = function(key, values, callback) { values = values.map(helpers.valueToString); db.collection('objects').find({_key: key, value: {$in: values}}).toArray(function(err, results) { - - + if (err) { + return callback(err); + } results = results.map(function(item) { return item.value; }); values = values.map(function(value) { return results.indexOf(value) !== -1; }); - console.log(err, values); callback(err, results); }); };