diff --git a/addons/sms/static/src/components/sms_button/sms_button.js b/addons/sms/static/src/components/sms_button/sms_button.js index fd7407f84c5..305e4764bac 100644 --- a/addons/sms/static/src/components/sms_button/sms_button.js +++ b/addons/sms/static/src/components/sms_button/sms_button.js @@ -2,7 +2,7 @@ import { _t } from "@web/core/l10n/translation"; import { useService } from "@web/core/utils/hooks"; -import { Component } from "@odoo/owl"; +import { Component, status } from "@odoo/owl"; export class SendSMSButton extends Component { setup() { @@ -32,6 +32,9 @@ export class SendSMSButton extends Component { }, { onClose: () => { + if (status(this) === "destroyed") { + return; + } this.props.record.load(); }, }