[FIX] compiler: force new block for svg nested in html

This commit is contained in:
Lucas Perais (lpe)
2022-01-24 12:23:04 +01:00
committed by Aaron Bohy
parent a4d9aae9a7
commit 72962f1dd1
3 changed files with 78 additions and 3 deletions
+2 -2
View File
@@ -524,10 +524,10 @@ export class CodeGenerator {
compileTDomNode(ast: ASTDomNode, ctx: Context) {
let { block, forceNewBlock } = ctx;
const isNewBlock = !block || forceNewBlock || ast.dynamicTag !== null;
const isNewBlock = !block || forceNewBlock || ast.dynamicTag !== null || ast.ns;
let codeIdx = this.target.code.length;
if (isNewBlock) {
if ((ast.dynamicTag || ctx.tKeyExpr) && ctx.block) {
if ((ast.dynamicTag || ctx.tKeyExpr || ast.ns) && ctx.block) {
this.insertAnchor(ctx.block!);
}
block = this.createBlock(block, "block", ctx);