dont crash if callback isnt passed in

v1.18.x
barisusakli 10 years ago
parent 2c45dc6450
commit bd8a77a22b

@ -11,6 +11,7 @@ module.exports = function(redisClient, module) {
}; };
module.setsAdd = function(keys, value, callback) { module.setsAdd = function(keys, value, callback) {
callback = callback || function() {};
helpers.multiKeysValue(redisClient, 'sadd', keys, value, function(err, res) { helpers.multiKeysValue(redisClient, 'sadd', keys, value, function(err, res) {
callback(err); callback(err);
}); });
@ -65,6 +66,7 @@ module.exports = function(redisClient, module) {
}; };
module.setRemoveRandom = function(key, callback) { module.setRemoveRandom = function(key, callback) {
callback = callback || function() {};
redisClient.spop(key, callback); redisClient.spop(key, callback);
}; };

Loading…
Cancel
Save