mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
dont return undefined from sortedSetsCard if keys is empty or falsy
This commit is contained in:
@@ -116,7 +116,7 @@ module.exports = function (redisClient, module) {
|
||||
};
|
||||
|
||||
module.sortedSetsCard = function (keys, callback) {
|
||||
if (Array.isArray(keys) && !keys.length) {
|
||||
if (!Array.isArray(keys) || !keys.length) {
|
||||
return callback(null, []);
|
||||
}
|
||||
var batch = redisClient.batch();
|
||||
|
||||
Reference in New Issue
Block a user