diff options
| author | Alexandre Kühn <aku@odoo.com> | 2020-08-19 10:09:31 +0000 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2020-08-27 15:26:33 +0000 |
| commit | 022fd7e1348b7f81eeaf1b122a063f2413369571 (patch) | |
| tree | 9f80ca0a76b2279fc563e9492bb051c3624cd4e0 /addons/mail/static/src/models/messaging_initializer/messaging_initializer.js | |
| parent | e0b24070cee3dc10db582d6d917651676dc9d4c6 (diff) | |
[FIX] mail: 'Cannot read messagingMenu of undefined' traceback
Before this commit, on page reload, sometimes web client crashed with
`Cannot read 'messagingMenu' of undefined`.
This happens due to messaging components making use of `messaging` in
`env` as if it was always set. In some rare cases, this is false,
hence the crash. This happens on root components of messaging such as
the messaging menu.
Creation of `env.messaging` has to be async, in other to ensure all
JS module that patches messaging are applied. The mounting of
messaging root components depends on other parts of the web client
like the SystrayMenu. So the proper fix is to guard `env.messaging`
on these root components.
Task-2238245
closes odoo/odoo#56682
X-original-commit: d1483ff3c83bb3146e80e5d65a27915c5b2a2bf9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/messaging_initializer/messaging_initializer.js')
| -rw-r--r-- | addons/mail/static/src/models/messaging_initializer/messaging_initializer.js | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/addons/mail/static/src/models/messaging_initializer/messaging_initializer.js b/addons/mail/static/src/models/messaging_initializer/messaging_initializer.js index 1fc042503be..eace6856ebb 100644 --- a/addons/mail/static/src/models/messaging_initializer/messaging_initializer.js +++ b/addons/mail/static/src/models/messaging_initializer/messaging_initializer.js @@ -17,8 +17,6 @@ function factory(dependencies) { * the current user. This includes pinned channels for instance. */ async start() { - await this.async(() => this.env.session.is_bound); - this.messaging.update({ history: [['create', { id: 'history', |
