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

Bounds checking on Array expansion magic.

This commit is contained in:
Matt Ranney
2011-11-16 12:10:19 -10:00
parent b9734d13eb
commit faca4a8dc9
2 changed files with 2 additions and 2 deletions

View File

@@ -632,7 +632,7 @@ RedisClient.prototype.send_command = function (command, args, callback) {
// and converts to:
// client.command(arg1, arg2, arg3, arg4, cb);
// which is convenient for some things like sadd
if (Array.isArray(args[args.length - 1])) {
if (args.length > 0 && Array.isArray(args[args.length - 1])) {
args = args.slice(0, -1).concat(args[args.length - 1]);
}