mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-08-26 21:16:23 +02:00
dont need to call multi if keys.length is 0
This commit is contained in:
@@ -363,7 +363,7 @@ module.exports = function (db, module) {
|
||||
|
||||
module.getSortedSetsMembers = function (keys, callback) {
|
||||
if (!Array.isArray(keys) || !keys.length) {
|
||||
return callback(null, []);
|
||||
return setImmediate(callback, null, []);
|
||||
}
|
||||
db.collection('objects').find({ _key: { $in: keys } }, { projection: { _id: 0, score: 0 } }).sort({ score: 1 }).toArray(function (err, data) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user