Fix jsonification of message, try sending reply immediately upon receiving message event
Test / test (push) Failing after 54s
Details
Test / test (push) Failing after 54s
Details
This commit is contained in:
parent
16250ef533
commit
5741b9fee2
|
|
@ -106,7 +106,7 @@ function TackUpNow({
|
||||||
{() => (
|
{() => (
|
||||||
<>
|
<>
|
||||||
{messages.map((message, index) => (
|
{messages.map((message, index) => (
|
||||||
<div key={index}>JSON.stringify(message)</div>
|
<div key={index}>{JSON.stringify(message)}</div>
|
||||||
))}
|
))}
|
||||||
{isInstalled ? (
|
{isInstalled ? (
|
||||||
<div>Your Notifications</div>
|
<div>Your Notifications</div>
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,10 @@ export default function start(self: ServiceWorkerGlobalScope) {
|
||||||
const waitEvent = event as ExtendableEvent
|
const waitEvent = event as ExtendableEvent
|
||||||
waitEvent.waitUntil(
|
waitEvent.waitUntil(
|
||||||
(async () => {
|
(async () => {
|
||||||
|
await sendMessage({
|
||||||
|
message: "Got message",
|
||||||
|
})
|
||||||
|
|
||||||
if (
|
if (
|
||||||
"type" in event &&
|
"type" in event &&
|
||||||
event.type === "subscribed" &&
|
event.type === "subscribed" &&
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue