diff --git a/src/CursorHistory.ts b/src/CursorHistory.ts index 2d13ee61..f0513800 100644 --- a/src/CursorHistory.ts +++ b/src/CursorHistory.ts @@ -36,7 +36,7 @@ export default class CursorHistory { const lastMessage = page.items.find((item) => item.connectionId === connectionId); if (!lastMessage) return [connectionId, cursors]; - const { data = [], clientId }: { data: OutgoingBuffer[] } & Pick = lastMessage; + const { data = [], clientId }: { data?: OutgoingBuffer[] } & Pick = lastMessage; const lastPositionSet = data[data.length - 1]?.cursor; const lastUpdate = lastPositionSet