From af306fff8c6ca9a1476b461a7d8d14e9771d3b36 Mon Sep 17 00:00:00 2001 From: atmosuwiryo Date: Thu, 12 Dec 2019 02:32:06 +0700 Subject: [PATCH] fix(core/web): make LocalNotifications.requestPermissions() work on Safari (#2205) --- core/src/web/local-notifications.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/web/local-notifications.ts b/core/src/web/local-notifications.ts index 86d25733b..24bb64b05 100644 --- a/core/src/web/local-notifications.ts +++ b/core/src/web/local-notifications.ts @@ -98,7 +98,7 @@ export class LocalNotificationsPluginWeb extends WebPlugin implements LocalNotif requestPermissions(): Promise { return new Promise((resolve, reject) => { - Notification.requestPermission().then((result) => { + Notification.requestPermission((result) => { if (result === 'denied' || result === 'default') { reject(result); return; @@ -106,8 +106,6 @@ export class LocalNotificationsPluginWeb extends WebPlugin implements LocalNotif resolve({ results: [ result ] }); - }).catch((e) => { - reject(e); }); }); }