From 83b307bb0ed0960ae7575c25fba1b4837eb5aeca Mon Sep 17 00:00:00 2001 From: "Louis Wicket (wil)" Date: Fri, 12 Aug 2022 15:19:03 +0000 Subject: [PATCH] [IMP] mail, im_livechat: remove useless guards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove useless guards introduced in odoo/odoo#97996. closes odoo/odoo#98147 Signed-off-by: Alexandre Kühn (aku) --- addons/im_livechat/static/src/models/composer_view.js | 2 +- addons/mail/static/src/models/file_uploader.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/im_livechat/static/src/models/composer_view.js b/addons/im_livechat/static/src/models/composer_view.js index 1fe09e83541..f3e3b5d95b4 100644 --- a/addons/im_livechat/static/src/models/composer_view.js +++ b/addons/im_livechat/static/src/models/composer_view.js @@ -9,7 +9,7 @@ patchRecordMethods('ComposerView', { * @override */ _computeDropZoneView() { - if (this.composer && this.composer.thread && this.composer.thread.channel && this.composer.thread.channel.channel_type === 'livechat') { + if (this.composer.thread && this.composer.thread.channel && this.composer.thread.channel.channel_type === 'livechat') { return clear(); } return this._super(); diff --git a/addons/mail/static/src/models/file_uploader.js b/addons/mail/static/src/models/file_uploader.js index 2149b32563f..504e05e3d58 100644 --- a/addons/mail/static/src/models/file_uploader.js +++ b/addons/mail/static/src/models/file_uploader.js @@ -76,7 +76,7 @@ registerModel({ if (this.chatterOwner) { return replace(this.chatterOwner.thread); } - if (this.composerView && this.composerView.composer) { + if (this.composerView) { return replace(this.composerView.composer.activeThread); } return clear();