[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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user