mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 21:09:18 +08:00
clear sw-cache if localhost or new version (#2242) by lukew3
This commit is contained in:
parent
f8c27c66a6
commit
3262a3bbe7
1 changed files with 4 additions and 0 deletions
|
@ -15,7 +15,11 @@ export async function show(version) {
|
|||
setMemory(version);
|
||||
return;
|
||||
}
|
||||
if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
|
||||
caches.delete('sw-cache');
|
||||
}
|
||||
if (memory === version) return;
|
||||
caches.delete('sw-cache');
|
||||
Notifications.add(
|
||||
`Version ${version} has been released. Click to view the changelog.`,
|
||||
1,
|
||||
|
|
Loading…
Reference in a new issue