mirror of
https://github.com/zadam/trilium.git
synced 2024-11-11 09:46:25 +08:00
hide log polluting error message
This commit is contained in:
parent
41908050bb
commit
f1412b631d
1 changed files with 6 additions and 1 deletions
7
src/public/javascripts/services/bootstrap.js
vendored
7
src/public/javascripts/services/bootstrap.js
vendored
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue