Skip to content

Commit

Permalink
merge master -> gh-1257
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Apr 1, 2018
2 parents c0287f2 + 0c9d703 commit 304a0e8
Show file tree
Hide file tree
Showing 44 changed files with 805 additions and 366 deletions.
4 changes: 4 additions & 0 deletions src/generators/Generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,10 @@ export default class Generator {
if (node.type === 'Component' && node.name === ':Component') {
node.metadata = contextualise(node.expression, contextDependencies, indexes, false);
}

if (node.type === 'Spread') {
node.metadata = contextualise(node.expression, contextDependencies, indexes, false);
}
},

leave(node: Node, parent: Node) {
Expand Down
5 changes: 2 additions & 3 deletions src/generators/nodes/Attribute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,9 @@ export default class Attribute {
);
}
} else {
const value =
this.value === true
const value = this.value === true
? 'true'
: this.value.length === 0 ? `''` : stringify(this.value[0].data);
: this.value.length === 0 ? `""` : stringify(this.value[0].data);

const statement = (
isLegacyInputType
Expand Down
Loading

0 comments on commit 304a0e8

Please sign in to comment.