You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// At the moment, Firefox (iOS) (10x) has an engine bug. See https://github.com/go-gitea/gitea/issues/20240
29
25
// If a script inserts a newly created (and content changed) element into DOM, there will be a nonsense error event reporting: Script error: line 0, col 0.
@@ -37,13 +33,6 @@ function initGlobalErrorHandler() {
37
33
if(!window.config){
38
34
showGlobalErrorMessage(`Gitea JavaScript code couldn't run correctly, please check your custom templates`);
39
35
}
40
-
if(window.config.initCount>1){
41
-
// when a sub-templates triggers an 500 error, its parent template has been partially rendered,
42
-
// then the 500 page will be rendered after that partially rendered page, which will cause the initCount > 1
43
-
// in this case, the page is totally broken, so do not do any further error handling
44
-
console.error('initGlobalErrorHandler: Gitea global config system has already been initialized, there must be something else wrong');
45
-
return;
46
-
}
47
36
// we added an event handler for window error at the very beginning of <script> of page head
48
37
// the handler calls `_globalHandlerErrors.push` (array method) to record all errors occur before this init
49
38
// then in this init, we can collect all error events and show them
0 commit comments