From f1412b631d35797ceab2fd8811bff3785bffd9ad Mon Sep 17 00:00:00 2001 From: azivner Date: Sun, 8 Jul 2018 23:13:56 +0200 Subject: [PATCH] hide log polluting error message --- src/public/javascripts/services/bootstrap.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/public/javascripts/services/bootstrap.js b/src/public/javascripts/services/bootstrap.js index 12a93497d..ca7f16183 100644 --- a/src/public/javascripts/services/bootstrap.js +++ b/src/public/javascripts/services/bootstrap.js @@ -47,7 +47,12 @@ window.onerror = function (msg, url, lineNo, columnNo, error) { let message = "Uncaught error: "; - if (string.indexOf("script error") > -1){ + if (string.includes("Cannot read property 'defaultView' of undefined")) { + // ignore this specific error which is very common but we don't know where it comes from + // and it seems to be harmless + return true; + } + else if (string.includes("script error")) { message += 'No details available'; } else {