dont return undefined from sortedSetsCard if keys is empty or falsy

This commit is contained in:
Baris Usakli
2018-12-07 16:50:35 -05:00
parent 76af8caf58
commit e65d40c937
4 changed files with 21 additions and 3 deletions

View File

@@ -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();