Clean up and improve non-gitea js error filter (#37148)

1. Filter out errors that contain `chrome-extension://` etc protocols
2. Extract filtering into its own function and test it
3. Fix the `window.config.assetUrlPrefix` mock, guaranteed to end with
`/assets`
4. Remove useless `??` and `?.` for properties that always exist

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
This commit is contained in:
silverwind
2026-04-09 10:36:08 +02:00
committed by GitHub
parent 6f9fa55785
commit 0914a44a9b
3 changed files with 31 additions and 9 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ await import('./globals.ts');
window.config = {
appUrl: 'http://localhost:3000/',
appSubUrl: '',
assetUrlPrefix: '',
assetUrlPrefix: '/assets',
sharedWorkerUri: '',
runModeIsProd: true,
customEmojis: {},