From d403a13a299a31910b7c6e173104f4d704624943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Tue, 18 May 2021 08:16:10 +0000 Subject: [PATCH] [FIX] web: update owl from 1.2.4 to v1.2.5 This commit update owl to the latest release. It only contains a small fix on the order of lookup for the t-component directive. Release on github: https://github.com/odoo/owl/releases/tag/v1.2.5 closes odoo/odoo#70972 X-original-commit: 67e706b76fefa7eaff12722a4bda6fa4ce497eaf Signed-off-by: Aaron Bohy (aab) --- addons/web/static/lib/owl/owl.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/addons/web/static/lib/owl/owl.js b/addons/web/static/lib/owl/owl.js index c1cb28a4670..a1b59470e5a 100644 --- a/addons/web/static/lib/owl/owl.js +++ b/addons/web/static/lib/owl/owl.js @@ -3188,13 +3188,10 @@ } ctx.addElse(); // new component - let dynamicFallback = ""; - if (!value.match(INTERP_REGEXP)) { - dynamicFallback = `|| ${ctx.formatExpression(value)}`; - } + const contextualValue = value.match(INTERP_REGEXP) ? "false" : ctx.formatExpression(value); const interpValue = ctx.interpolate(value); ctx.addLine(`let componentKey${componentID} = ${interpValue};`); - ctx.addLine(`let W${componentID} = context.constructor.components[componentKey${componentID}] || QWeb.components[componentKey${componentID}]${dynamicFallback};`); + ctx.addLine(`let W${componentID} = ${contextualValue} || context.constructor.components[componentKey${componentID}] || QWeb.components[componentKey${componentID}];`); // maybe only do this in dev mode... ctx.addLine(`if (!W${componentID}) {throw new Error('Cannot find the definition of component "' + componentKey${componentID} + '"')}`); ctx.addLine(`w${componentID} = new W${componentID}(parent, props${componentID});`); @@ -5391,9 +5388,9 @@ exports.utils = utils; - __info__.version = '1.2.4'; - __info__.date = '2021-02-10T13:24:25.187Z'; - __info__.hash = '985e985'; + __info__.version = '1.2.5'; + __info__.date = '2021-05-18T08:01:47.651Z'; + __info__.hash = '968a546'; __info__.url = 'https://github.com/odoo/owl';