mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
fix(assets): handle SKIP_WAITING message in service worker
This commit is contained in:
@@ -116,6 +116,13 @@ self.addEventListener('activate', (event) => {
|
||||
)
|
||||
})
|
||||
|
||||
/** Allow clients to trigger immediate activation of a waiting service worker. */
|
||||
self.addEventListener('message', (event) => {
|
||||
if (event.data?.type === 'SKIP_WAITING') {
|
||||
self.skipWaiting()
|
||||
}
|
||||
})
|
||||
|
||||
/* ========== Fetch Strategies ========== */
|
||||
|
||||
/** Route same-origin GET requests to the appropriate caching strategy. */
|
||||
|
||||
Reference in New Issue
Block a user