Skip to content

Commit

Permalink
fix: return early if keys is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Mar 15, 2019
1 parent 1c671c3 commit b3962c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/database/redis/sets.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ module.exports = function (redisClient, module) {

module.setsAdd = function (keys, value, callback) {
callback = callback || function () {};
if (!Array.isArray(keys) || !keys.length) {
}
helpers.execKeysValue(redisClient, 'batch', 'sadd', keys, value, function (err) {
callback(err);
});
Expand Down

0 comments on commit b3962c1

Please sign in to comment.