Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Sep 9, 2019
1 parent 6892c4a commit 5d8ca9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/compiler/compile/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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})`;
}
Expand Down

0 comments on commit 5d8ca9f

Please sign in to comment.