Skip to content

Commit

Permalink
fix: non-owned properties cause empty args for mset & hmset (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
taichunmin authored and luin committed May 23, 2017
1 parent 38db0cc commit e7b6352
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/utils/index.js
Expand Up @@ -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;
};
Expand Down

0 comments on commit e7b6352

Please sign in to comment.