forked from mystiq/hydrogen-web
fix c/p errors when moving code over to notif service
This commit is contained in:
parent
bddf6ba6ae
commit
dbddba3691
1 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ export class NotificationService {
|
|||
|
||||
async disablePush() {
|
||||
const registration = await this._serviceWorkerHandler?.getRegistration();
|
||||
if (this.registration?.pushManager) {
|
||||
if (registration?.pushManager) {
|
||||
const subscription = await registration.pushManager.getSubscription();
|
||||
if (subscription) {
|
||||
await subscription.unsubscribe();
|
||||
|
@ -55,7 +55,7 @@ export class NotificationService {
|
|||
|
||||
async isPushEnabled() {
|
||||
const registration = await this._serviceWorkerHandler?.getRegistration();
|
||||
if (this.registration?.pushManager) {
|
||||
if (registration?.pushManager) {
|
||||
const subscription = await registration.pushManager.getSubscription();
|
||||
return !!subscription;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue