summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/public
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2020-01-02 11:11:19 +0000
committerqsm-odoo <qsm@odoo.com>2020-01-08 11:41:33 +0000
commit54a95099bfc7dc3181bb35a6c03bc350e8bcfb31 (patch)
tree01533b8fb9ff20b65e5114c27ab78503bed6870f /addons/web/static/src/js/public
parentd165a8ce1390c74253879963e0f041991e32fc19 (diff)
[REF] web: remove custom frontend code since done by crashmanager
The handling of unhandledrejection in the frontend was done with dedicated code since the crashmanager was not in the frontend. This is the case now so that dedicated code became useless. closes odoo/odoo#42927 Signed-off-by: fja-odoo <fja-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js/public')
-rw-r--r--addons/web/static/src/js/public/public_root.js13
1 files changed, 0 insertions, 13 deletions
diff --git a/addons/web/static/src/js/public/public_root.js b/addons/web/static/src/js/public/public_root.js
index 31b39e97abb..a567734546b 100644
--- a/addons/web/static/src/js/public/public_root.js
+++ b/addons/web/static/src/js/public/public_root.js
@@ -19,19 +19,6 @@ function getLang() {
var lang = utils.get_cookie('frontend_lang') || getLang(); // FIXME the cookie value should maybe be in the ctx?
var localeDef = ajax.loadJS('/web/webclient/locale/' + lang.replace('-', '_'));
-// In the frontend, there is no CrashManager instance. Errors are displayed in
-// the console. However, we do want to do the same as the backend for Promise
-// unhandled rejections.
-window.addEventListener('unhandledrejection', function (ev) {
- if (!ev.reason || !(ev.reason instanceof Error)) {
- // the rejection is not due to an Error, so prevent the browser
- // from displaying an 'unhandledrejection' error in the console
- ev.stopPropagation();
- ev.stopImmediatePropagation();
- ev.preventDefault();
- }
-});
-
/**
* Element which is designed to be unique and that will be the top-most element
* in the widget hierarchy. So, all other widgets will be indirectly linked to