[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
+2 -2
View File
@@ -46,9 +46,9 @@ export class TemplateSet {
dev?: boolean;
constructor() {
const call = (subTemplate: string, ctx: any, parent: any) => {
const call = (owner: any, subTemplate: string, ctx: any, parent: any) => {
const template = this.getTemplate(subTemplate);
return toggler(subTemplate, template(ctx, parent));
return toggler(subTemplate, template.call(owner, ctx, parent));
};
const getTemplate = (name: string) => this.getTemplate(name);