diff options
| author | Alexandre Kühn <aku@odoo.com> | 2019-02-19 09:24:40 +0000 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2019-02-19 09:39:57 +0000 |
| commit | 0fb43cf1336ce00800163308a67809889057371d (patch) | |
| tree | 3714ef9a228d3e90c45bdeb0b20550b0d1114829 /addons/mail/static/src/js/thread_windows/thread_window.js | |
| parent | 2be9d73f648899b42d97ed5615085dfe9317480a (diff) | |
[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
Diffstat (limited to 'addons/mail/static/src/js/thread_windows/thread_window.js')
| -rw-r--r-- | addons/mail/static/src/js/thread_windows/thread_window.js | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |
