Skip to content

Build your personal knowledge base with Trilium Notes

hide log polluting error message

azivnerf1412b631d35
diff --git a/src/public/javascripts/services/bootstrap.js b/src/public/javascripts/services/bootstrap.js
index 12a93497de..ca7f161836 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 {