diff --git a/lib/hooks/useSSESubscription.ts b/lib/hooks/useSSESubscription.ts index c7858ff..36f9cda 100644 --- a/lib/hooks/useSSESubscription.ts +++ b/lib/hooks/useSSESubscription.ts @@ -30,7 +30,7 @@ export function useSSESubscription({ enabled = true, url, onNewData, onDiscon console.log("EVENT") console.log(event) const newData = JSON.parse(event.data) as T; - if (typeof newData === "object" && newData !== null && "event" in newData && newData.event !== "ping") { + if (!(typeof newData === "object" && newData !== null && "event" in newData && newData.event === "ping")) { devlog(`new SSE: ${marker}`, newData); onNewDataRef.current([newData]); } diff --git a/package.json b/package.json index b82bc31..0f78d3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@frontend/kitui", - "version": "1.0.99", + "version": "1.0.107", "description": "test", "main": "./dist/index.js", "module": "./dist/index.js",