Fix script error alert (#37458)

After using CSP nonce, the "onerror" doesn't work anymore. Change it to
use a global variable to detect

Also help users like #37379 to catch errors more easily.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
wxiaoguang
2026-04-28 07:08:50 +08:00
committed by GitHub
parent 6da8027446
commit 89d358d8a7
5 changed files with 9 additions and 21 deletions
+2
View File
@@ -171,3 +171,5 @@ const initDur = performance.now() - initStartTime;
if (initDur > 500) {
console.error(`slow init functions took ${initDur.toFixed(3)}ms`);
}
window.config.frontendInited = true;