summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/chrome/abstract_web_client.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-09-13 19:30:33 +0200
committerChristophe Simonis <chs@odoo.com>2018-09-13 19:30:33 +0200
commitf3fa5a5ef7d2e86a38f988f799a0ea33304d1e14 (patch)
treea73fd937fa8f23ae016070ec14c0a2a21621ed68 /addons/web/static/src/js/chrome/abstract_web_client.js
parent5cfd3d5fa022e8cafb3da3d2468cc8364f0e47b3 (diff)
parent1e0a92c99626c30aa7a196c1f970b75294dbf2d0 (diff)
[MERGE] forward port branch saas-11.3 up to 1e0a92c9962
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.js6
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 bce77a352ea..45013858e1b 100644
--- a/addons/web/static/src/js/chrome/abstract_web_client.js
+++ b/addons/web/static/src/js/chrome/abstract_web_client.js
@@ -182,7 +182,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;
@@ -190,7 +192,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 {