|
|
@ -36,9 +36,9 @@ function subscribePush (registration, isEnabled, vapidPublicKey) {
|
|
|
|
|
|
|
|
|
|
|
|
function unsubscribePush (registration) {
|
|
|
|
function unsubscribePush (registration) {
|
|
|
|
return registration.pushManager.getSubscription()
|
|
|
|
return registration.pushManager.getSubscription()
|
|
|
|
.then((subscribtion) => {
|
|
|
|
.then((subscription) => {
|
|
|
|
if (subscribtion === null) { return }
|
|
|
|
if (subscription === null) { return }
|
|
|
|
return subscribtion.unsubscribe()
|
|
|
|
return subscription.unsubscribe()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|