fix if block case

pull/3945/head
Rich Harris 6 years ago
parent 3cd8f35e1a
commit e79ce79c3a

@ -399,7 +399,7 @@ export default class IfBlockWrapper extends Wrapper {
} }
` `
: b` : b`
function ${select_block_type}(#changed, #ctx) { function ${select_block_type}(#ctx, #changed) {
${this.branches.map(({ condition, snippet }, i) => condition ${this.branches.map(({ condition, snippet }, i) => condition
? b`if (${snippet || condition}) return ${i};` ? b`if (${snippet || condition}) return ${i};`
: b`return ${i};`)} : b`return ${i};`)}

Loading…
Cancel
Save