[FIX] compiler: t-key on a sub-domnode pushes an anchor in parent block

This commit is contained in:
Lucas Perais (lpe)
2022-01-20 16:26:05 +01:00
committed by Aaron Bohy
parent 6d9ed0d62f
commit a8d88d4009
3 changed files with 56 additions and 1 deletions
+1 -1
View File
@@ -523,7 +523,7 @@ export class CodeGenerator {
const isNewBlock = !block || forceNewBlock || ast.dynamicTag !== null;
let codeIdx = this.target.code.length;
if (isNewBlock) {
if (ast.dynamicTag && ctx.block) {
if ((ast.dynamicTag || ctx.tKeyExpr) && ctx.block) {
this.insertAnchor(ctx.block!);
}
block = this.createBlock(block, "block", ctx);