We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6134ebd commit e35db80Copy full SHA for e35db80
src/simulator.ts
@@ -51,7 +51,17 @@ function initServiceWorker() {
51
52
if (flags.sw) {
53
initServiceWorker();
54
+} else {
55
+ navigator.serviceWorker.getRegistrations().then(registrations => {
56
+ if (registrations.length > 0) {
57
+ // We should only have one service worker to unregister.
58
+ registrations[0].unregister().then(() => {
59
+ window.location.reload();
60
+ })
61
+ }
62
63
}
64
+
65
const fs = new FileSystem();
66
const board = createBoard(new Notifications(window.parent), fs);
67
window.addEventListener("message", createMessageListener(board));
0 commit comments