diff --git a/addons/web/static/lib/owl/owl.js b/addons/web/static/lib/owl/owl.js index 9efcc66f3b6..2b94a9bf142 100644 --- a/addons/web/static/lib/owl/owl.js +++ b/addons/web/static/lib/owl/owl.js @@ -2076,7 +2076,7 @@ set(target, key, value, receiver) { const hadKey = objectHasOwnProperty.call(target, key); const originalValue = Reflect.get(target, key, receiver); - const ret = Reflect.set(target, key, value, receiver); + const ret = Reflect.set(target, key, toRaw(value), receiver); if (!hadKey && objectHasOwnProperty.call(target, key)) { notifyReactives(target, KEYCHANGES); } @@ -3200,7 +3200,14 @@ this.translateFn = config.translateFn; this.translatableAttributes = config.translatableAttributes; if (config.templates) { - this.addTemplates(config.templates); + if (config.templates instanceof Document || typeof config.templates === "string") { + this.addTemplates(config.templates); + } + else { + for (const name in config.templates) { + this.addTemplate(name, config.templates[name]); + } + } } } static registerTemplate(name, fn) { @@ -5282,14 +5289,14 @@ // be ignored) let el = slotNode.parentElement; let isInSubComponent = false; - while (el !== clone) { + while (el && el !== clone) { if (el.hasAttribute("t-component") || el.tagName[0] === el.tagName[0].toUpperCase()) { isInSubComponent = true; break; } el = el.parentElement; } - if (isInSubComponent) { + if (isInSubComponent || !el) { continue; } slotNode.removeAttribute("t-set-slot"); @@ -5558,7 +5565,7 @@ } // do not modify manually. This file is generated by the release script. - const version = "2.2.6"; + const version = "2.2.7"; // ----------------------------------------------------------------------------- // Scheduler @@ -5905,7 +5912,7 @@ See https://github.com/odoo/owl/blob/${hash}/doc/reference/app.md#configuration * * @template T * @param {Effect} effect the effect to run on component mount and/or patch - * @param {()=>T} [computeDependencies=()=>[NaN]] a callback to compute + * @param {()=>[...T]} [computeDependencies=()=>[NaN]] a callback to compute * dependencies that will decide if the effect needs to be cleaned up and * run again. If the dependencies did not change, the effect will not run * again. The default value returns an array containing only NaN because @@ -6023,8 +6030,8 @@ See https://github.com/odoo/owl/blob/${hash}/doc/reference/app.md#configuration Object.defineProperty(exports, '__esModule', { value: true }); - __info__.date = '2023-09-25T11:50:11.419Z'; - __info__.hash = '5dcee25'; + __info__.date = '2023-12-06T13:56:01.636Z'; + __info__.hash = 'e94428a'; __info__.url = 'https://github.com/odoo/owl';