[FIX] component: prevent collision between template ids and keys

This commit is contained in:
Géry Debongnie
2019-09-02 15:27:37 +02:00
parent 4cd08d25c8
commit b344d73e07
3 changed files with 28 additions and 4 deletions
+1 -1
View File
@@ -238,7 +238,7 @@ QWeb.addDirective({
if (key) {
// we bind a variable to the key (could be a complex expression, so we
// want to evaluate it only once)
ctx.addLine(`let key${keyID} = ${key};`);
ctx.addLine(`let key${keyID} = 'key' + ${key};`);
}
ctx.addLine(`let def${defID};`);
let templateID = key