[FIX] web_editor: collaboration error

In order to improve the user Experience and not uselessly
block access to the document, we prevent collaboration error
to open the traceback dialog.

task-3568680

closes odoo/odoo#139964

X-original-commit: df39cbc4dbc1922e91c53278db7fdcb12f01306e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
This commit is contained in:
Sébastien Geelen (sge)
2023-11-02 12:03:44 +00:00
parent c89ab9aa2d
commit 30f6ff4f93
@@ -334,12 +334,18 @@ export class PeerToPeer {
);
}
}
const baseMethod = baseNotificationMethods[notification.notificationName];
if (baseMethod) {
return baseMethod.call(this, notification);
}
if (this.options.onNotification) {
return this.options.onNotification(notification);
try {
const baseMethod = baseNotificationMethods[notification.notificationName];
if (baseMethod) {
return baseMethod.call(this, notification);
}
if (this.options.onNotification) {
return this.options.onNotification(notification);
}
} catch (error) {
console.groupCollapsed('=== ERROR: On notification in collaboration ===');
console.error(error);
console.groupEnd();
}
}
}
@@ -578,8 +584,8 @@ export class PeerToPeer {
);
}
/**
* Attempts a connection recovery by updating the tracks, which will start a new transaction:
* negotiationneeded -> offer -> answer -> ...
* Attempts a connection recovery by updating the tracks, which will start
* a new transaction: negotiationneeded -> offer -> answer -> ...
*
* @private
* @param {Object} [param1]