1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

fix: always copy subscribe unsubscribe arguments

This commit is contained in:
Ruben Bridgewater
2017-05-05 18:41:04 +02:00
parent d9480d7982
commit 77281cadad
2 changed files with 15 additions and 10 deletions

View File

@@ -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

View File

@@ -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;