[FIX] web: prevent error if subscriptions.update is undefined

Steps to follow

- Install web_dashboard,website_sale
- Go to the eCommerce Dashboard
- Click on Favorites
- Click on Add to my dashboard
- Go to the Dashboard app
- Click on orders
-> A traceback occurs

Cause of the issue

`this.subscriptions.update` is undefined

opw-2630849

closes odoo/odoo#75984

X-original-commit: 8ab700fc8e51631663443b6c8e81db9669375d82
Signed-off-by: Hubert Van De Walle <hubvd@users.noreply.github.com>
This commit is contained in:
Hubert Van de Walle (huvw)
2021-09-06 12:03:46 +00:00
parent 3a4d518303
commit cc744d1b12
+1 -1
View File
@@ -429,7 +429,7 @@ odoo.define("web.Model", function (require) {
*/
async _notifyComponents() {
const rev = ++this.rev;
const subscriptions = this.subscriptions.update;
const subscriptions = this.subscriptions.update || [];
const groups = partitionBy(subscriptions, (s) =>
s.owner ? s.owner.__owl__.depth : -1
);