Skip to content

Commit

Permalink
Update service-worker.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 authored Oct 31, 2023
1 parent b4b5e1a commit 6993e7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/service-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ self.addEventListener("push", async function (event) {
if (event.data) {
const data = JSON.parse(event.data.text());

if (data?.type === "MESSAGE") {
if (["MESSAGE","PUSH_MESSAGE"].includes(data?.type)) {
self.clients.matchAll().then((clients) => {
clients[0].postMessage(data);
});
Expand Down

0 comments on commit 6993e7a

Please sign in to comment.