1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-09-08 12:57:55 +02:00

Fix update behaviour

This commit is contained in:
nimbleghost 2023-06-29 15:07:18 +02:00
parent 55eed868fa
commit 9fa1288dbc
3 changed files with 32 additions and 1 deletions

View file

@ -2,6 +2,7 @@
import { cleanupOutdatedCaches, createHandlerBoundToURL, precacheAndRoute } from "workbox-precaching";
import { NavigationRoute, registerRoute } from "workbox-routing";
import { NetworkFirst } from "workbox-strategies";
import { clientsClaim } from "workbox-core";
import { dbAsync } from "../src/app/db";
@ -224,6 +225,8 @@ precacheAndRoute(
self.__WB_MANIFEST
);
// Claim all open windows
clientsClaim();
// Delete any cached old dist files from previous service worker versions
cleanupOutdatedCaches();