From a43504fec9353abeede944268846d299cb5f5c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Tue, 20 Sep 2022 13:20:08 +0000 Subject: [PATCH] [FIX] mail: guard ChatWindowHeaderView/onClick MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This handler was not properly guarded, and made `.TestMailChannelExpand` fail on runbot. closes odoo/odoo#100588 Signed-off-by: Sébastien Theys (seb) --- addons/mail/static/src/models/chat_window_header_view.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/mail/static/src/models/chat_window_header_view.js b/addons/mail/static/src/models/chat_window_header_view.js index 1a8fd8a99b8..fd7081caff3 100644 --- a/addons/mail/static/src/models/chat_window_header_view.js +++ b/addons/mail/static/src/models/chat_window_header_view.js @@ -11,6 +11,9 @@ registerModel({ * @param {MouseEvent} ev */ onClick(ev) { + if (!this.exists()) { + return; + } if ( isEventHandled(ev, 'ChatWindow.onClickCommand') || isEventHandled(ev, 'ChatWindow.onClickHideMemberList') ||