diff --git a/addons/mail/static/src/models/notification_group_view.js b/addons/mail/static/src/models/notification_group_view.js index f0fd24d61ec..707b371c435 100644 --- a/addons/mail/static/src/models/notification_group_view.js +++ b/addons/mail/static/src/models/notification_group_view.js @@ -19,9 +19,10 @@ registerModel({ // handled in `_onClickMarkAsRead` return; } + const messaging = this.messaging; this.notificationGroup.openDocuments(); - if (!this.messaging.device.isSmall) { - this.messaging.messagingMenu.close(); + if (!messaging.device.isSmall) { + messaging.messagingMenu.close(); } }, /**