From eb1243d407b71478250b52788b72f4ae332a65a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Thu, 8 Jul 2021 11:54:58 +0200 Subject: [PATCH] [IMP] update owl to v1.4.3 --- owl.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/owl.js b/owl.js index 7269b1a3..7d4f3da3 100644 --- a/owl.js +++ b/owl.js @@ -1464,12 +1464,26 @@ } return result; }, + /** + * This method combines the current context with the variables defined in a + * scope for use in a slot. + * + * The implementation is kind of tricky because we want to preserve the + * prototype chain structure of the cloned result. So we need to traverse the + * prototype chain, cloning each level respectively. + */ combine(context, scope) { - const clone = Object.create(context); + let clone = context; + const scopeStack = []; while (!isComponent(scope)) { - Object.assign(clone, scope); + scopeStack.push(scope); scope = scope.__proto__; } + while (scopeStack.length) { + let scope = scopeStack.pop(); + clone = Object.create(clone); + Object.assign(clone, scope); + } return clone; }, shallowEqual, @@ -5530,9 +5544,9 @@ See https://github.com/odoo/owl/blob/master/doc/reference/config.md#mode for mor exports.utils = utils; - __info__.version = '1.4.2'; - __info__.date = '2021-07-07T12:57:07.352Z'; - __info__.hash = '8083678'; + __info__.version = '1.4.3'; + __info__.date = '2021-07-08T09:54:52.593Z'; + __info__.hash = '9fe2da7'; __info__.url = 'https://github.com/odoo/owl';