diff --git a/src/database/mongo/sets.js b/src/database/mongo/sets.js index b6626e1c7c..ccd656aaf2 100644 --- a/src/database/mongo/sets.js +++ b/src/database/mongo/sets.js @@ -106,9 +106,10 @@ module.exports = function(db, module) { }; module.isSetMembers = function(key, values, callback) { - if (!key) { - return callback(); + if (!key || !Array.isArray(values) || !values.length) { + return callback(null, []); } + for (var i=0; i