Skip to content

Commit e7b6352

Browse files
taichunminluin
authored andcommitted
fix: non-owned properties cause empty args for mset & hmset (#469)
1 parent 38db0cc commit e7b6352

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/utils/index.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,10 @@ exports.timeout = function (callback, timeout) {
170170
*/
171171
exports.convertObjectToArray = function (obj) {
172172
var result = [];
173-
var pos = 0;
174173
for (var key in obj) {
175174
if (obj.hasOwnProperty(key)) {
176-
result[pos] = key;
177-
result[pos + 1] = obj[key];
175+
result.push(key, obj[key]);
178176
}
179-
pos += 2;
180177
}
181178
return result;
182179
};

0 commit comments

Comments
 (0)