mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-22 07:44:11 +00:00
[backport rh-test] [bugfix] fix service worker opaqueredirect error and ensure SW controls page before mount (#6276)
Backport of #6275 to `rh-test` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6276-backport-rh-test-bugfix-fix-service-worker-opaqueredirect-error-and-ensure-SW-control-2976d73d365081df8292f69e00f43e9a) by [Unito](https://www.unito.io) Co-authored-by: Christian Byrne <cbyrne@comfy.org>
This commit is contained in:
@@ -86,8 +86,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')
|
||||
|
||||
@@ -5,5 +5,5 @@ import { isCloud } from '@/platform/distribution/types'
|
||||
* Tree-shaken for desktop/localhost builds via compile-time constant.
|
||||
*/
|
||||
if (isCloud) {
|
||||
void import('./register')
|
||||
await import('./register')
|
||||
}
|
||||
|
||||
@@ -54,4 +54,4 @@ function setupCacheInvalidation(): void {
|
||||
})
|
||||
}
|
||||
|
||||
void registerAuthServiceWorker()
|
||||
await registerAuthServiceWorker()
|
||||
|
||||
Reference in New Issue
Block a user