Revert "Differentiate object spread and non-spread properties (#9341)" (#9379)

This reverts commit 3ae5e79ec8.
This commit is contained in:
Daniel Tschinder
2019-01-21 23:03:54 -08:00
committed by Logan Smyth
parent af88e63dff
commit 43b83f8ed7
10 changed files with 21 additions and 42 deletions

View File

@@ -412,10 +412,15 @@ export default declare((api, opts) => {
let props = [];
function push() {
if (!props.length) return;
args.push(t.objectExpression(props));
props = [];
}
if (t.isSpreadElement(path.node.properties[0])) {
args.push(t.objectExpression([]));
}
for (const prop of (path.node.properties: Array)) {
if (t.isSpreadElement(prop)) {
push();
@@ -425,9 +430,7 @@ export default declare((api, opts) => {
}
}
if (props.length) {
push();
}
push();
let helper;
if (loose) {