ServiceWorker: drop empty push events

renovate/lock-file-maintenance
Alex Gleason 2023-01-05 11:57:44 -06:00
rodzic 35c916293e
commit 7a14d56f9f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -134,7 +134,10 @@ const htmlToPlainText = (html: string): string =>
/** ServiceWorker `push` event callback. */
const handlePush = (event: PushEvent) => {
const { access_token, notification_id, preferred_locale, title, body, icon } = event.data?.json();
// If event has no data, stop here.
if (!event.data) return;
const { access_token, notification_id, preferred_locale, title, body, icon } = event.data.json();
// Placeholder until more information can be loaded
event.waitUntil(