Skip to content

Commit 29d069a

Browse files
author
Benjamin Coe
committed
fix: whoops, let's make the assign not change the Object key order
1 parent b43b7c1 commit 29d069a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -695,12 +695,12 @@ function assign (defaults, configuration) {
695695
var o = {}
696696
configuration = configuration || {}
697697

698+
Object.keys(defaults).forEach(function (k) {
699+
o[k] = defaults[k]
700+
})
698701
Object.keys(configuration).forEach(function (k) {
699702
o[k] = configuration[k]
700703
})
701-
Object.keys(defaults).forEach(function (k) {
702-
if (o[k] === undefined) o[k] = defaults[k]
703-
})
704704

705705
return o
706706
}

0 commit comments

Comments
 (0)