[FIX] compiler, component: dynamic t-slot with scope

A little typo was preventing a dynamic t-slot with a scope
(`<t t-slot="{{ state.name }}" myScope="someValue" />`)
to work properly.

This commit corrects this.
This commit is contained in:
Lucas Perais (lpe)
2022-03-31 15:52:04 +02:00
committed by Géry Debongnie
parent 989b0d6709
commit decf42c742
3 changed files with 71 additions and 3 deletions
+1 -1
View File
@@ -1234,7 +1234,7 @@ export class CodeGenerator {
if (dynamic) {
let name = this.generateId("slot");
this.define(name, slotName);
blockString = `toggler(${name}, callSlot(ctx, node, key, ${name}), ${dynamic}, ${scope})`;
blockString = `toggler(${name}, callSlot(ctx, node, key, ${name}, ${dynamic}, ${scope}))`;
} else {
blockString = `callSlot(ctx, node, key, ${slotName}, ${dynamic}, ${scope})`;
}