diff --git a/addons/web/static/src/js/public/public_root.js b/addons/web/static/src/js/public/public_root.js index 31b39e97abb9389f0d7ae4525883ce2e21c73cf7..a567734546b31c290441cfeb24e78b87c31c43b4 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