fix chrome "this site has been updated in the background" message
parent
858e72e9e9
commit
8b5ca6a0ca
|
@ -7,14 +7,14 @@ function assetUrl(path: string): string {
|
|||
|
||||
self.addEventListener('push', event => {
|
||||
const data = event.data!.json();
|
||||
return self.registration.showNotification(data.title, {
|
||||
return event.waitUntil(self.registration.showNotification(data.title, {
|
||||
badge: assetUrl('logo/lichess-mono-128.png'),
|
||||
icon: assetUrl('logo/lichess-favicon-192.png'),
|
||||
body: data.body,
|
||||
tag: data.tag,
|
||||
data: data.payload,
|
||||
requireInteraction: true,
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
||||
async function handleNotificationClick(event: NotificationEvent) {
|
||||
|
|
Loading…
Reference in New Issue