Skip to content

Commit a31d899

Browse files
fix: don't allow empty cids for sync api call (#1814)
1 parent b1c0a63 commit a31d899

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package/src/components/Chat/hooks/useConnectionRecovered.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const useConnectionRecovered = <
3535
});
3636
const cids = getAllChannelIds();
3737

38-
if (lastSyncedAt) {
38+
if (lastSyncedAt && cids?.length) {
3939
try {
4040
const result = await client.sync(cids, new Date(lastSyncedAt).toISOString());
4141
const queries = result.events.reduce<PreparedQueries[]>((queries, event) => {

0 commit comments

Comments
 (0)