[FIX] qweb: improve generated compiled code

This commit is contained in:
Géry Debongnie
2019-10-11 12:44:21 +02:00
parent 0928c189f4
commit 41b0618c93
8 changed files with 4 additions and 150 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ export class Context {
if (!this.rootContext.rootNode) {
this.rootContext.rootNode = node;
}
if (!this.parentNode) {
if (!this.parentNode && this.rootContext.shouldDefineResult) {
this.addLine(`result = vn${node};`);
}
return this.subContext("parentNode", node);