[REF] compiler: minor cleanup

This commit merges two nested ifs and explicitly joins an array instead
of relying on array -> string coercion
This commit is contained in:
Samuel Degueldre
2023-08-04 08:49:08 +02:00
committed by Lucas Perais - lpe@odoo
parent 9823a4e7dd
commit 28672096a2
22 changed files with 99 additions and 101 deletions
@@ -376,7 +376,7 @@ exports[`t-model directive on an input, type=checkbox 1`] = `
let block1 = createBlock(\`<div><input type=\\"checkbox\\" block-property-0=\\"checked\\" block-handler-1=\\"input\\"/><span><block-child-0/><block-child-1/></span></div>\`);
return function template(ctx, node, key = \\"\\") {
let b2,b3;
let b2, b3;
const bExpr1 = ctx['state'];
const expr1 = 'flag';
let prop1 = bExpr1[expr1];
@@ -640,7 +640,7 @@ exports[`t-model directive two inputs in a div alternating with a t-if 1`] = `
let block3 = createBlock(\`<input class=\\"b\\" block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
return function template(ctx, node, key = \\"\\") {
let b2,b3;
let b2, b3;
if (ctx['state'].flag) {
const bExpr1 = ctx['state'];
const expr1 = 'text1';