Created
January 30, 2019 08:13
-
-
Save kloudsamurai/0f4b48108babd0f706bd90f7205a9a36 to your computer and use it in GitHub Desktop.
Remove all installed service workers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (typeof window !== 'undefined' && 'serviceWorker' in navigator) { | |
| window.navigator.serviceWorker.getRegistrations().then(registrations => { | |
| registrations.forEach(r => r.unregister()) | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment