mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-10 23:50:00 +00:00
[bugfix] fix service worker opaqueredirect error and ensure SW controls page before mount (#6275)
Fixes service worker network error by handling opaqueredirect responses correctly and ensures SW registration completes before app mount to prevent race conditions on first load. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6275-bugfix-fix-service-worker-opaqueredirect-error-and-ensure-SW-controls-page-before-mount-2976d73d36508106bc65dc82cdc62779) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -83,8 +83,9 @@ app
|
||||
})
|
||||
|
||||
// Register auth service worker after Pinia is initialized (cloud-only)
|
||||
// Wait for registration to complete before mounting to ensure SW controls the page
|
||||
if (isCloud) {
|
||||
void import('@/platform/auth/serviceWorker')
|
||||
await import('@/platform/auth/serviceWorker')
|
||||
}
|
||||
|
||||
app.mount('#vue-app')
|
||||
|
||||
Reference in New Issue
Block a user