From 0fb43cf1336ce00800163308a67809889057371d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Tue, 19 Feb 2019 09:24:40 +0000 Subject: [FIX] mail: no traceback on receiving seen notification Before this commit, when we post a message and someone has received it, there could be a traceback. Steps to reproduce: 1. Two users are logged in. 2. On one user: - open any app except Discuss - From systray messaging menu, click on "New messages" - Open Discuss - Post a message in a direct chat with other User. > traceback `Cannot read property 'getID' of null` closes odoo/odoo#31228 --- addons/mail/static/src/js/thread_windows/thread_window.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'addons/mail/static/src/js/thread_windows/thread_window.js') diff --git a/addons/mail/static/src/js/thread_windows/thread_window.js b/addons/mail/static/src/js/thread_windows/thread_window.js index 331228c91c8..d7f6acbda5f 100644 --- a/addons/mail/static/src/js/thread_windows/thread_window.js +++ b/addons/mail/static/src/js/thread_windows/thread_window.js @@ -377,6 +377,9 @@ var ThreadWindow = AbstractThreadWindow.extend({ * @param {integer} channelID */ _onUpdateChannel: function (channelID) { + if (!this.hasThread()) { + return; + } if (this._thread.getID() !== channelID) { return; } -- cgit v1.2.3