♻️ (notification)

This commit is contained in:
2020-07-12 22:52:37 +02:00
parent 6e0d7d2bbc
commit d9385bc457

View File

@@ -7,10 +7,9 @@ if (process.env.NODE_ENV === 'production') {
register(`${process.env.BASE_URL}service-worker.js`, {
ready(sw) {
sw.getNotifications().then((notifs) => {
const newVersions = notifs.filter(
(notif) => notif.tag === 'new-version'
)
newVersions.forEach((notif) => notif.close())
notifs
.filter((notif) => notif.tag === 'new-version')
.forEach((notif) => notif.close())
})
console.log('App is being served from cache by a service worker')
setNotificationInstance((title, options?) =>