Skip to content

Commit 11b6e7b

Browse files
committed
fix
1 parent ecd1d96 commit 11b6e7b

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

web_src/js/bootstrap.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,19 @@ function processWindowErrorEvent({error, reason, message, type, filename, lineno
5252
if (runModeIsProd) return;
5353
}
5454

55-
// If the error stack trace does not include the base URL of our script assets, it likely came
56-
// from a browser extension or inline script. Do not show such errors in production.
57-
if (err instanceof Error && !err.stack?.includes(assetBaseUrl) && runModeIsProd) {
58-
return;
55+
if (err instanceof Error) {
56+
// If the error stack trace does not include the base URL of our script assets, it likely came
57+
// from a browser extension or inline script. Do not show such errors in production.
58+
if (!err.stack?.includes(assetBaseUrl) && runModeIsProd) {
59+
return;
60+
}
61+
// Ignore some known errors that are unable to fix
62+
const ignorePatterns = [
63+
'/assets/js/monaco.', // https://github.com/go-gitea/gitea/issues/30861 , https://github.com/microsoft/monaco-editor/issues/4496
64+
];
65+
for (const pattern of ignorePatterns) {
66+
if (err.stack.includes(pattern)) return;
67+
}
5968
}
6069

6170
let msg = err?.message ?? message;

0 commit comments

Comments
 (0)