mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-18 03:26:07 +08:00
chore: check if caches exists
This commit is contained in:
parent
07f2d8667d
commit
949b61801c
1 changed files with 1 additions and 0 deletions
|
@ -48,6 +48,7 @@ async function check(): Promise<void> {
|
|||
}
|
||||
|
||||
function purgeCaches(): void {
|
||||
if (!("caches" in window)) return;
|
||||
void caches.keys().then(function (names) {
|
||||
for (const name of names) void caches.delete(name);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue