Use Object Spread Syntax (#7777)

* Use Object Spread Syntax

* Nits
This commit is contained in:
Justin Ridgewell
2018-04-23 21:44:27 -04:00
committed by GitHub
parent 037fee8ffb
commit 2afe9404fe
37 changed files with 263 additions and 70 deletions

View File

@@ -62,7 +62,9 @@ export default function cloneNode<T: Object>(node: T, deep: boolean = true): T {
newNode.trailingComments = node.trailingComments;
}
if (has(node, "extra")) {
newNode.extra = Object.assign({}, node.extra);
newNode.extra = {
...node.extra,
};
}
return newNode;