From 6bb0d0007f1451fca219956a33c5b3458f1d8606 Mon Sep 17 00:00:00 2001 From: Jacky Liu Date: Thu, 2 Mar 2017 11:35:44 +0800 Subject: [PATCH] Fix option param null bug options.rename_commands could be null, and the repo README.md list the default value is "null"; --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 798b78954b..23c11ef333 100644 --- a/index.js +++ b/index.js @@ -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.