unique name for select_block_type in IfBlock#buildCompoundWithOutros

Fixes #1580
pull/1586/head
Conduitry 6 years ago
parent 909536dac9
commit a2368cde46

@ -250,7 +250,7 @@ export default class IfBlock extends Node {
dynamic,
{ name, anchor, hasElse }
) {
const select_block_type = block.getUniqueName(`select_block_type`);
const select_block_type = this.compiler.getUniqueName(`select_block_type`);
const current_block_type_index = block.getUniqueName(`current_block_type_index`);
const previous_block_index = block.getUniqueName(`previous_block_index`);
const if_block_creators = block.getUniqueName(`if_block_creators`);

@ -0,0 +1,7 @@
export default {
nestedTransitions: true,
html: `
<div></div>
<div></div>
`,
};

@ -0,0 +1,20 @@
{#if foo}
<Component/>
{:else}
<Component/>
{/if}
{#if foo}
<div></div>
{:else}
<div></div>
{/if}
<script>
export default {
components: {
Component: './Component.html',
},
data: () => ({ foo: true }),
}
</script>
Loading…
Cancel
Save