[FIX] compiler: call dynamic templates with correct this

This commit is contained in:
Géry Debongnie
2021-11-25 17:22:31 +01:00
committed by Aaron Bohy
parent 2601a176c4
commit 0bbea351a6
6 changed files with 61 additions and 6 deletions
+1 -1
View File
@@ -898,7 +898,7 @@ export class CodeGenerator {
const templateVar = this.generateId("template");
this.addLine(`const ${templateVar} = ${subTemplate};`);
block = this.createBlock(block, "multi", ctx);
this.insertBlock(`call(${templateVar}, ctx, node, ${key})`, block!, {
this.insertBlock(`call(this, ${templateVar}, ctx, node, ${key})`, block!, {
...ctx,
forceNewBlock: !block,
});