diff options
| author | Sébastien Theys <seb@odoo.com> | 2021-03-11 17:58:38 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2021-03-11 17:58:38 +0000 |
| commit | 852781cf64ad6bb10c552e106e93e2bb6035e34b (patch) | |
| tree | dc9565acd19026a631120ae81a3df04bb2d783d5 /addons/web/static/src/js | |
| parent | a1a4f4548b395127cf7f816379a63f2d47688893 (diff) | |
[FIX] web: prevent popover race condition between unmount and event
These are throttled/debounced so the handlers are sometimes called after the
component has been destroyed.
opw-2451752
closes odoo/odoo#67723
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/core/popover.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/web/static/src/js/core/popover.js b/addons/web/static/src/js/core/popover.js index d2102b56d3c..2400f075ca0 100644 --- a/addons/web/static/src/js/core/popover.js +++ b/addons/web/static/src/js/core/popover.js @@ -219,6 +219,9 @@ odoo.define('web.Popover', function (require) { * @param {Event} ev */ _onResizeWindow(ev) { + if (this.__owl__.status === 5 /* destroyed */) { + return; + } this._compute(); } @@ -230,6 +233,9 @@ odoo.define('web.Popover', function (require) { * @param {Event} ev */ _onScrollDocument(ev) { + if (this.__owl__.status === 5 /* destroyed */) { + return; + } this._compute(); } |
