diff --git a/docs/src/content/snippets/home-client.ts b/docs/src/content/snippets/home-client.ts index 8ca553c..3c0543a 100644 --- a/docs/src/content/snippets/home-client.ts +++ b/docs/src/content/snippets/home-client.ts @@ -1,6 +1,6 @@ const es = new EventSource("/sse") -es.addEventListener("message", (event) => { - const data = JSON.parse(event.data) - console.log(data) +es.addEventListener("message", ({ data })) => { + const contents = JSON.parse(data) + console.log(contents) })