Skip to content

Commit

Permalink
Fix config merge logic. (#1723)
Browse files Browse the repository at this point in the history
  • Loading branch information
jheer committed Mar 25, 2019
1 parent a0763f4 commit 3132c40
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/vega-parser/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ function copy(output, key, value, recurse) {
if (isObject(value) && !isArray(value)) {
o = isObject(output[key]) ? output[key] : (output[key] = {});
for (k in value) {
if (!recurse || !recurse[k]) o[k] = value[k];
else copy(o, k, value[k]);
if (recurse && (recurse === true || recurse[k])) {
copy(o, k, value[k]);
} else {
o[k] = value[k];
}
}
} else {
output[key] = value;
Expand Down

0 comments on commit 3132c40

Please sign in to comment.