Skip to content

Commit

Permalink
Merge pull request #1289 from sveltejs/gh-195
Browse files Browse the repository at this point in the history
Multi-spread
  • Loading branch information
Rich-Harris authored Apr 1, 2018
2 parents ae25641 + 7c47cc1 commit f27b29d
Show file tree
Hide file tree
Showing 40 changed files with 753 additions and 303 deletions.
4 changes: 4 additions & 0 deletions src/generators/Generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,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 f27b29d

Please sign in to comment.