mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
handle empty set, add test
This commit is contained in:
@@ -36,6 +36,9 @@ module.exports = function (db, module) {
|
||||
}
|
||||
|
||||
if (Array.isArray(key)) {
|
||||
if (!key.length) {
|
||||
return setImmediate(callback, null, []);
|
||||
}
|
||||
key = { $in: key };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user