diff --git a/src/compile/nodes/IfBlock.ts b/src/compile/nodes/IfBlock.ts index 730128fc71da..23ac29166e28 100644 --- a/src/compile/nodes/IfBlock.ts +++ b/src/compile/nodes/IfBlock.ts @@ -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`); diff --git a/test/runtime/samples/if-block-outro-unique-select-block-type/Component.html b/test/runtime/samples/if-block-outro-unique-select-block-type/Component.html new file mode 100644 index 000000000000..7c89b545c5ac --- /dev/null +++ b/test/runtime/samples/if-block-outro-unique-select-block-type/Component.html @@ -0,0 +1 @@ +
diff --git a/test/runtime/samples/if-block-outro-unique-select-block-type/_config.js b/test/runtime/samples/if-block-outro-unique-select-block-type/_config.js new file mode 100644 index 000000000000..f3cbb42e25e7 --- /dev/null +++ b/test/runtime/samples/if-block-outro-unique-select-block-type/_config.js @@ -0,0 +1,7 @@ +export default { + nestedTransitions: true, + html: ` + + + `, +}; diff --git a/test/runtime/samples/if-block-outro-unique-select-block-type/main.html b/test/runtime/samples/if-block-outro-unique-select-block-type/main.html new file mode 100644 index 000000000000..a27aba9d77dd --- /dev/null +++ b/test/runtime/samples/if-block-outro-unique-select-block-type/main.html @@ -0,0 +1,20 @@ +{#if foo} +