|
@@ -14,22 +14,22 @@ export function unregister() {
|
|
|
registration.unregister();
|
|
|
});
|
|
|
|
|
|
- navigator.serviceWorker
|
|
|
- .getRegistrations()
|
|
|
- .then(registrations => {
|
|
|
- for (const registration of registrations) {
|
|
|
- registration.unregister().then(boolean => {
|
|
|
- if (boolean) {
|
|
|
- console.log('Service Worker unregistered successfully');
|
|
|
- } else {
|
|
|
- console.log('Service Worker unregistration failed');
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(error => {
|
|
|
- console.error('Error getting Service Worker registrations:', error);
|
|
|
- });
|
|
|
+ // navigator.serviceWorker
|
|
|
+ // .getRegistrations()
|
|
|
+ // .then(registrations => {
|
|
|
+ // for (const registration of registrations) {
|
|
|
+ // registration.unregister().then(boolean => {
|
|
|
+ // if (boolean) {
|
|
|
+ // console.log('Service Worker unregistered successfully');
|
|
|
+ // } else {
|
|
|
+ // console.log('Service Worker unregistration failed');
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch(error => {
|
|
|
+ // console.error('Error getting Service Worker registrations:', error);
|
|
|
+ // });
|
|
|
} else {
|
|
|
console.log('Service Workers are not supported in this browser');
|
|
|
}
|