mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
fix c/p errors when moving code over to notif service
This commit is contained in:
parent
bddf6ba6ae
commit
dbddba3691
@ -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 New Issue
Block a user