pull/3540/head
Richard Harris 5 years ago
parent 6892c4a048
commit 5d8ca9f07d

@ -165,11 +165,10 @@ export default class Component {
this.file =
compile_options.filename &&
// eslint-disable-next-line no-useless-escape
(typeof process !== 'undefined'
? compile_options.filename
.replace(process.cwd(), '')
.replace(/^[\/\\]/, '')
.replace(process.cwd(), '')
.replace(/^[/\\]/, '')
: compile_options.filename);
this.locate = getLocator(this.source);

@ -199,7 +199,7 @@ export default class InlineComponentWrapper extends Wrapper {
const value = attr.expression.render(block);
initial_props.push(value);
let value_object = value
let value_object = value;
if (attr.expression.node.type !== 'ObjectExpression') {
value_object = `@get_spread_object(${value})`;
}

Loading…
Cancel
Save