mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
Simpler fallback
This commit is contained in:
@@ -1,14 +1,4 @@
|
||||
// I accidentally shipped with the wrong service worker name.
|
||||
// This picks up users that still might be using that version.
|
||||
// We'll be able to delete this file eventually.
|
||||
|
||||
addEventListener('install', () => {
|
||||
skipWaiting();
|
||||
});
|
||||
addEventListener('activate', async () => {
|
||||
await self.registration.unregister();
|
||||
const allClients = await clients.matchAll({
|
||||
includeUncontrolled: true,
|
||||
});
|
||||
for (const client of allClients) client.navigate('/');
|
||||
});
|
||||
skipWaiting();
|
||||
|
||||
Reference in New Issue
Block a user