1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Fix option param null bug

options.rename_commands could be null, and the repo README.md list the default value is "null";
This commit is contained in:
Jacky Liu
2017-03-02 11:35:44 +08:00
committed by GitHub
parent 4d23636c4d
commit 6bb0d0007f

View File

@@ -931,7 +931,7 @@ RedisClient.prototype.internal_send_command = function (command_obj) {
args_copy[i] = this.options.prefix + args_copy[i];
}
}
if (typeof this.options.rename_commands !== 'undefined' && this.options.rename_commands[command]) {
if (this.options.rename_commands && this.options.rename_commands[command]) {
command = this.options.rename_commands[command];
}
// Always use 'Multi bulk commands', but if passed any Buffer args, then do multiple writes, one for each arg.