mirror of
https://github.com/langgenius/dify.git
synced 2026-05-09 12:59:18 +08:00
feat: add error handling for service worker unregistration
Co-authored-by: hyoban <38493346+hyoban@users.noreply.github.com>
This commit is contained in:
parent
e6d925cad0
commit
57df92aba7
@ -11,6 +11,10 @@ export function PWAProvider({ children }: { children: React.ReactNode }) {
|
||||
registrations.forEach((registration) => {
|
||||
registration.unregister()
|
||||
})
|
||||
}).catch((error) => {
|
||||
// Silently fail if service worker unregistration fails
|
||||
// This is a development-only optimization and shouldn't block the app
|
||||
console.warn('Failed to unregister service workers:', error)
|
||||
})
|
||||
}
|
||||
}, [])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user