mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
[bugfix] remove await from service worker registration to prevent blocking app mount
The await was causing the app to hang on deployment with a white screen because the service worker registration promise was not resolving. Changed back to void import() to allow the app to mount immediately while service worker registration happens in the background.
This commit is contained in:
@@ -86,9 +86,8 @@ 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) {
|
||||
await import('@/platform/auth/serviceWorker')
|
||||
void 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) {
|
||||
await import('./register')
|
||||
void import('./register')
|
||||
}
|
||||
|
||||
@@ -54,4 +54,4 @@ function setupCacheInvalidation(): void {
|
||||
})
|
||||
}
|
||||
|
||||
await registerAuthServiceWorker()
|
||||
void registerAuthServiceWorker()
|
||||
|
||||
Reference in New Issue
Block a user