[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#67754

X-original-commit: 852781cf64ad6bb10c552e106e93e2bb6035e34b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Sébastien Theys
2021-03-12 10:56:50 +00:00
parent 752a8dabad
commit d64c23df65
+6
View File
@@ -217,6 +217,9 @@ odoo.define('web.Popover', function (require) {
* @param {Event} ev
*/
_onResizeWindow(ev) {
if (this.__owl__.status === 5 /* destroyed */) {
return;
}
this._compute();
}
@@ -228,6 +231,9 @@ odoo.define('web.Popover', function (require) {
* @param {Event} ev
*/
_onScrollDocument(ev) {
if (this.__owl__.status === 5 /* destroyed */) {
return;
}
this._compute();
}