Skip to content

Node.js based forum software built for the modern web

fixes crash is sets is empty

barisusakli3865fd3ab9b7
diff --git a/src/database/mongo/sets.js b/src/database/mongo/sets.js
index d1b053ce26..b6626e1c7c 100644
--- a/src/database/mongo/sets.js
+++ b/src/database/mongo/sets.js
@@ -128,7 +128,7 @@ module.exports = function(db, module) {
module.isMemberOfSets = function(sets, value, callback) {
if (!Array.isArray(sets) || !sets.length) {
- return callback();
+ return callback(null, []);
}
value = helpers.valueToString(value);