From e7b6352883939c45ee1c38a7194f0bebb126ffa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E5=9D=87=E6=B0=91?= Date: Tue, 23 May 2017 03:13:43 -0500 Subject: [PATCH] fix: non-owned properties cause empty args for mset & hmset (#469) --- lib/utils/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/utils/index.js b/lib/utils/index.js index 26b8a9e6..573de2af 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -170,13 +170,10 @@ exports.timeout = function (callback, timeout) { */ exports.convertObjectToArray = function (obj) { var result = []; - var pos = 0; for (var key in obj) { if (obj.hasOwnProperty(key)) { - result[pos] = key; - result[pos + 1] = obj[key]; + result.push(key, obj[key]); } - pos += 2; } return result; };