fix: update src/service-worker.js

pull/2296/head
Nolan Lawson 2022-12-10 15:13:13 -08:00 zatwierdzone przez GitHub
rodzic 49120e370f
commit a820b741a3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -171,6 +171,7 @@ self.addEventListener('fetch', event => {
self.addEventListener('push', event => {
event.waitUntil((async () => {
const data = event.data.json()
// If there is only once instance, then we know for sure that the push notification came from it
const knownInstances = await getKnownInstances()
if (knownInstances.length !== 1) {
// TODO: find a way to determine the pushing instance from the PushEvent