Don't clone prev, there's no need
This commit is contained in:
parent
3317f996a7
commit
6170f524ba
|
@ -2,7 +2,7 @@ export default function(obj) {
|
|||
// non-recursive for the moment
|
||||
return Object.keys(obj).reduce(function(prev, item, i, arr) {
|
||||
if (obj[item] !== null) {
|
||||
return { ...prev, ...{ [item]: obj[item] } };
|
||||
prev[item] = obj[item];
|
||||
}
|
||||
return prev;
|
||||
}, {});
|
||||
|
|
Loading…
Reference in New Issue