mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-03 19:36:25 +02:00
Fix cannot update (#5890)
This commit is contained in:
20
src/server/web/views/flash.pug
Normal file
20
src/server/web/views/flash.pug
Normal file
@@ -0,0 +1,20 @@
|
||||
doctype html
|
||||
|
||||
html
|
||||
script.
|
||||
localStorage.removeItem('locale');
|
||||
|
||||
try {
|
||||
navigator.serviceWorker.controller.postMessage('clear');
|
||||
|
||||
navigator.serviceWorker.getRegistrations().then(registrations => {
|
||||
return Promise.all(registrations.map(registration => registration.unregister()));
|
||||
}).then(() => {
|
||||
location = '/';
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
setTimeout(() => {
|
||||
location = '/';
|
||||
}, 10000)
|
||||
}
|
||||
Reference in New Issue
Block a user