qweb: properly deal with dynamic attributes from t-set

This commit is contained in:
Géry Debongnie
2019-02-03 19:33:33 +01:00
parent 150dac04d4
commit b244ba7304
3 changed files with 37 additions and 1 deletions
+1 -1
View File
@@ -381,7 +381,7 @@ export class QWeb {
// dynamic attributes
if (name.startsWith("t-att-")) {
const attName = name.slice(6);
const formattedValue = this._formatExpression(value!);
const formattedValue = this._formatExpression(ctx.getValue(value!));
const attID = ctx.generateID();
ctx.addLine(`let _${attID} = ${formattedValue};`);
attrs.push(`${attName}: _${attID}`);