Skip to content

Commit

Permalink
fix(core/web): make LocalNotifications.requestPermissions() work on S…
Browse files Browse the repository at this point in the history
…afari (#2205)
  • Loading branch information
atmosuwiryo authored and jcesarmobile committed Dec 11, 2019
1 parent 8549141 commit af306ff
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/src/web/local-notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,14 @@ export class LocalNotificationsPluginWeb extends WebPlugin implements LocalNotif

requestPermissions(): Promise<PermissionsRequestResult> {
return new Promise((resolve, reject) => {
Notification.requestPermission().then((result) => {
Notification.requestPermission((result) => {
if (result === 'denied' || result === 'default') {
reject(result);
return;
}
resolve({
results: [ result ]
});
}).catch((e) => {
reject(e);
});
});
}
Expand Down

0 comments on commit af306ff

Please sign in to comment.