diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-09-10 19:21:57 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-09-10 19:21:57 +0200 |
| commit | 826cd9b3d3281fa78bf7a8b10d2ca1efff87d703 (patch) | |
| tree | 538e6b7162ba66be03958ddf5f7b7cf027b98a75 /addons/web/static/src/js/chrome/abstract_web_client.js | |
| parent | 4850fb08385de3f0851a732c97c90402e89838b7 (diff) | |
| parent | c3ea0a781132b6bb4c00e7856b2e0aa1b5c20f28 (diff) | |
[MERGE] forward port branch 11.0 up to c3ea0a78113
Diffstat (limited to 'addons/web/static/src/js/chrome/abstract_web_client.js')
| -rw-r--r-- | addons/web/static/src/js/chrome/abstract_web_client.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js index f502f37be94..cc22c2b9af0 100644 --- a/addons/web/static/src/js/chrome/abstract_web_client.js +++ b/addons/web/static/src/js/chrome/abstract_web_client.js @@ -190,7 +190,9 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi // If it is not handled, we should display something clearer than the common crash_manager error dialog // since it won't show anything except "Script error." // This link will probably explain it better: https://blog.sentry.io/2016/05/17/what-is-script-error.html - if (message === "Script error." && !file && !line && !col && !error) { + if (!file && !line && !col) { + // Chrome and Opera set "Script error." on the `message` and hide the `error` + // Firefox handles the "Script error." directly. It sets the error thrown by the CORS file into `error` if (window.onOriginError) { window.onOriginError(); delete window.onOriginError; @@ -198,7 +200,7 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi crash_manager.show_error({ type: _t("Odoo Client Error"), message: _t("Unknown CORS error"), - data: {debug: _t("An unknown CORS error occured. The error probably originates from a JavaScript file served from a different origin.")}, + data: {debug: _t("An unknown CORS error occured. The error probably originates from a JavaScript file served from a different origin. (Opening your browser console might give you a hint on the error.)")}, }); } } else { |
