Skip to content

Commit

Permalink
Fix option param null bug
Browse files Browse the repository at this point in the history
options.rename_commands could be null, and the repo README.md list the default value is "null";
  • Loading branch information
liujiaqiid committed Mar 2, 2017
1 parent 4d23636 commit 6bb0d00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -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.
Expand Down

0 comments on commit 6bb0d00

Please sign in to comment.