lib/rails/generators/rails/app/templates/app/views/pwa/service-worker.js in railties-7.2.0 vs lib/rails/generators/rails/app/templates/app/views/pwa/service-worker.js in railties-7.2.1

- old
+ new

@@ -2,23 +2,23 @@ // // self.addEventListener("push", async (event) => { // const { title, options } = await event.data.json() // event.waitUntil(self.registration.showNotification(title, options)) // }) -// +// // self.addEventListener("notificationclick", function(event) { // event.notification.close() // event.waitUntil( // clients.matchAll({ type: "window" }).then((clientList) => { // for (let i = 0; i < clientList.length; i++) { // let client = clientList[i] // let clientPath = (new URL(client.url)).pathname -// +// // if (clientPath == event.notification.data.path && "focus" in client) { // return client.focus() // } // } -// +// // if (clients.openWindow) { // return clients.openWindow(event.notification.data.path) // } // }) // )