[FIX] web: restore proper public widgets onFailure in old guardedCatch
Commit [1] made a mistake when adapting the guardedCatch handler. [1]: https://github.com/odoo/odoo/commit/fcb16a3b1bd373726ffb54f0fbe41fb6d1784769 closes odoo/odoo#163486 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -246,7 +246,9 @@ export const PublicRoot = publicWidget.RootWidget.extend({
|
||||
this._startWidgets(ev.data.$target, ev.data.options)
|
||||
.then(ev.data.onSuccess)
|
||||
.catch((e) => {
|
||||
ev.data.onFailure(e);
|
||||
if (ev.data.onFailure) {
|
||||
ev.data.onFailure(e);
|
||||
}
|
||||
if (!(e instanceof RPCError)) {
|
||||
return Promise.reject(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user