Skip to content

Commit

Permalink
fix: always copy subscribe unsubscribe arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
BridgeAR committed Jul 20, 2017
1 parent 4271a70 commit 6934270
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
9 changes: 7 additions & 2 deletions 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

Expand Down
16 changes: 8 additions & 8 deletions lib/individualCommands.js
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6934270

Please sign in to comment.