fix typeerror in search because of wrong js-sdk t.ds

This commit is contained in:
Ajay Bura 2024-05-02 21:21:10 +05:30
parent 3e756b64c8
commit d8564b55d1

View file

@ -55,9 +55,9 @@ const parseSearchResult = (result: ISearchResponse): SearchResult => {
const roomEvents = result.search_categories.room_events;
const searchResult: SearchResult = {
nextToken: roomEvents.next_batch,
highlights: roomEvents.highlights,
groups: groupSearchResult(roomEvents.results),
nextToken: roomEvents?.next_batch,
highlights: roomEvents?.highlights ?? [],
groups: groupSearchResult(roomEvents?.results ?? []),
};
return searchResult;