Skip to content

Commit

Permalink
Fix background error
Browse files Browse the repository at this point in the history
  • Loading branch information
powerivq committed Jul 3, 2020
1 parent cdefa1b commit f6bc771
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ts/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ function supportsImageProp(): boolean {
return !/Mac OS X/.test(navigator.userAgent);
}

function showMessage(data: Data): void {
function showMessage(data: Data): Promise<undefined> {
const options = {
data: data,
body: data.excerpt,
icon: supportsImageProp() ? undefined : data.image,
image: data.image,
silent: true,
};
self.registration.showNotification(data.title, options);
return self.registration.showNotification(data.title, options);
}

self.addEventListener('push', function (event) {
Expand Down

0 comments on commit f6bc771

Please sign in to comment.