Commit a6934b36 authored by Curtis Adam's avatar Curtis Adam

Always upsert web-push subscriptions

parent 9627db83
......@@ -12,10 +12,8 @@ export let CardsetNavigation = class CardsetNavigation {
navigator.serviceWorker.getRegistration()
.then(function (registration) {
return registration.pushManager.getSubscription()
.then(function (subscription) {
if (!subscription) {
return registration.pushManager.subscribe({userVisibleOnly: true});
}
.then(function () {
return registration.pushManager.subscribe({userVisibleOnly: true});
});
})
.then(function (subscription) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment