[FIX] web: correctly display crashes in firefox
After the update of jQuery, crashes were no longer displayed (in dialogs) on browsers using the unhandled-rejection-polyfill lib (e.g. firefox). This was due to a bad conversion from ES6 to ES5. Issue reported on the jquery update pad. closes odoo/odoo#31767 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
This commit is contained in:
@@ -51,7 +51,7 @@ MyPromise.prototype.__proto__ = OriginalPromise.prototype;
|
||||
|
||||
MyPromise.prototype.then = function (resolve, reject) {
|
||||
var self = this;
|
||||
return OriginalPromise.prototype.then.call(this, resolve, reject && (function reason() {
|
||||
return OriginalPromise.prototype.then.call(this, resolve, reject && (function (reason) {
|
||||
self.handled = true;
|
||||
return reject(reason);
|
||||
}));
|
||||
@@ -59,7 +59,7 @@ MyPromise.prototype.then = function (resolve, reject) {
|
||||
|
||||
MyPromise.prototype.catch = function (reject) {
|
||||
var self = this;
|
||||
return OriginalPromise.prototype.catch.call(this, reject && (function reason() {
|
||||
return OriginalPromise.prototype.catch.call(this, reject && (function (reason) {
|
||||
self.handled = true;
|
||||
return reject(reason);
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user