fix issue with t-if confusing patching algorithm

This commit is contained in:
Géry Debongnie
2019-02-15 14:35:46 +01:00
parent d9ef6d1e93
commit d7d0912853
5 changed files with 116 additions and 81 deletions
+3 -1
View File
@@ -431,7 +431,9 @@ export class QWeb {
}
let nodeID = ctx.generateID();
let p =
attrs.length + tattrs.length > 0 ? `{attrs:{${attrs.join(",")}}}` : "{}";
attrs.length + tattrs.length > 0
? `{key:${nodeID},attrs:{${attrs.join(",")}}}`
: `{key:${nodeID}}`;
ctx.addLine(`let c${nodeID} = [], p${nodeID} = ${p};`);
for (let id of tattrs) {
ctx.addIf(`_${id} instanceof Array`);