mirror of https://github.com/hashicorp/consul
Don't clone prev, there's no need
parent
67402b3d26
commit
c01fb37c46
|
@ -2,7 +2,7 @@ export default function(obj) {
|
||||||
// non-recursive for the moment
|
// non-recursive for the moment
|
||||||
return Object.keys(obj).reduce(function(prev, item, i, arr) {
|
return Object.keys(obj).reduce(function(prev, item, i, arr) {
|
||||||
if (obj[item] !== null) {
|
if (obj[item] !== null) {
|
||||||
return { ...prev, ...{ [item]: obj[item] } };
|
prev[item] = obj[item];
|
||||||
}
|
}
|
||||||
return prev;
|
return prev;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
Loading…
Reference in New Issue