From 29d069a95aaa513430d226cd05ffc288c8856392 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Thu, 29 Sep 2016 23:48:18 -0700 Subject: [PATCH] fix: whoops, let's make the assign not change the Object key order --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 084a2ffd..564cb2ed 100644 --- a/index.js +++ b/index.js @@ -695,12 +695,12 @@ function assign (defaults, configuration) { var o = {} configuration = configuration || {} + Object.keys(defaults).forEach(function (k) { + o[k] = defaults[k] + }) Object.keys(configuration).forEach(function (k) { o[k] = configuration[k] }) - Object.keys(defaults).forEach(function (k) { - if (o[k] === undefined) o[k] = defaults[k] - }) return o }