lib/generators/wasmify/pwa/templates/pwa/rails.sw.js in wasmify-rails-0.1.2 vs lib/generators/wasmify/pwa/templates/pwa/rails.sw.js in wasmify-rails-0.1.3
- old
+ new
@@ -69,10 +69,10 @@
console.log("[rails-web] Activate Service Worker");
});
self.addEventListener("install", (event) => {
console.log("[rails-web] Install Service Worker");
- event.waitUntil(installApp());
+ event.waitUntil(installApp().then(() => self.skipWaiting()));
});
const rackHandler = new RackHandler(initVM, { assumeSSL: true });
self.addEventListener("fetch", (event) => {