remove some unreachable code

pull/3539/head
Richard Harris 6 years ago
parent 9d9245d096
commit 13de893e89

@ -152,21 +152,17 @@ export default class InlineComponentWrapper extends Wrapper {
}); });
} }
if (uses_spread) { attribute_object = {
attribute_object = initial_props; type: 'ObjectExpression',
} else { properties: this.node.attributes.map(attr => {
attribute_object = { return {
type: 'ObjectExpression', type: 'Property',
properties: this.node.attributes.map(attr => { kind: 'init',
return { key: { type: 'Identifier', name: attr.name },
type: 'Property', value: attr.get_value(block)
kind: 'init', }
key: { type: 'Identifier', name: attr.name }, }).concat(initial_props.properties)
value: attr.get_value(block) } as Expression;
}
}).concat(initial_props.properties)
} as Expression;
}
component_opts.properties.push({ component_opts.properties.push({
type: 'Property', type: 'Property',

Loading…
Cancel
Save