You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Merge pull request #761 from vitaliylag/patch-1
Callback should be optional when using Array args. Closes #321 #502 #694 #398
This commit is contained in:
2
index.js
2
index.js
@@ -937,7 +937,7 @@ commands.forEach(function (fullCommand) {
|
||||
var command = fullCommand.split(' ')[0];
|
||||
|
||||
RedisClient.prototype[command] = function (args, callback) {
|
||||
if (Array.isArray(args) && typeof callback === "function") {
|
||||
if (Array.isArray(args)) {
|
||||
return this.send_command(command, args, callback);
|
||||
} else {
|
||||
return this.send_command(command, to_array(arguments));
|
||||
|
Reference in New Issue
Block a user