diff --git a/changelog.md b/changelog.md index da42bdd9264..60ab4e58f1e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ -Changelog -========= +# Changelog + +## v.2.7.2 - 14 Mar, 2017 + +Bugfixes + +- Fixed not always copying subscribe unsubscribe arguments ## v.2.7.1 - 14 Mar, 2017 diff --git a/lib/individualCommands.js b/lib/individualCommands.js index 88fca126887..d366b642502 100644 --- a/lib/individualCommands.js +++ b/lib/individualCommands.js @@ -398,7 +398,7 @@ RedisClient.prototype.subscribe = RedisClient.prototype.SUBSCRIBE = function sub callback, i = 0; if (Array.isArray(arguments[0])) { - arr = arguments[0]; + arr = arguments[0].slice(0); callback = arguments[1]; } else { len = arguments.length; @@ -425,7 +425,7 @@ Multi.prototype.subscribe = Multi.prototype.SUBSCRIBE = function subscribe () { callback, i = 0; if (Array.isArray(arguments[0])) { - arr = arguments[0]; + arr = arguments[0].slice(0); callback = arguments[1]; } else { len = arguments.length; @@ -453,7 +453,7 @@ RedisClient.prototype.unsubscribe = RedisClient.prototype.UNSUBSCRIBE = function callback, i = 0; if (Array.isArray(arguments[0])) { - arr = arguments[0]; + arr = arguments[0].slice(0); callback = arguments[1]; } else { len = arguments.length; @@ -481,7 +481,7 @@ Multi.prototype.unsubscribe = Multi.prototype.UNSUBSCRIBE = function unsubscribe callback, i = 0; if (Array.isArray(arguments[0])) { - arr = arguments[0]; + arr = arguments[0].slice(0); callback = arguments[1]; } else { len = arguments.length; @@ -510,7 +510,7 @@ RedisClient.prototype.psubscribe = RedisClient.prototype.PSUBSCRIBE = function p callback, i = 0; if (Array.isArray(arguments[0])) { - arr = arguments[0]; + arr = arguments[0].slice(0); callback = arguments[1]; } else { len = arguments.length; @@ -537,7 +537,7 @@ Multi.prototype.psubscribe = Multi.prototype.PSUBSCRIBE = function psubscribe () callback, i = 0; if (Array.isArray(arguments[0])) { - arr = arguments[0]; + arr = arguments[0].slice(0); callback = arguments[1]; } else { len = arguments.length; @@ -565,7 +565,7 @@ RedisClient.prototype.punsubscribe = RedisClient.prototype.PUNSUBSCRIBE = functi callback, i = 0; if (Array.isArray(arguments[0])) { - arr = arguments[0]; + arr = arguments[0].slice(0); callback = arguments[1]; } else { len = arguments.length; @@ -593,7 +593,7 @@ Multi.prototype.punsubscribe = Multi.prototype.PUNSUBSCRIBE = function punsubscr callback, i = 0; if (Array.isArray(arguments[0])) { - arr = arguments[0]; + arr = arguments[0].slice(0); callback = arguments[1]; } else { len = arguments.length;