You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Merge branch 'poljar/empty-search-error' into develop
This commit is contained in:
@@ -87,6 +87,13 @@ async function localSearch(searchTerm, roomId = undefined) {
|
|||||||
searchArgs.room_id = roomId;
|
searchArgs.room_id = roomId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const emptyResult = {
|
||||||
|
results: [],
|
||||||
|
highlights: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
if (searchTerm === "") return emptyResult;
|
||||||
|
|
||||||
const eventIndex = EventIndexPeg.get();
|
const eventIndex = EventIndexPeg.get();
|
||||||
|
|
||||||
const localResult = await eventIndex.search(searchArgs);
|
const localResult = await eventIndex.search(searchArgs);
|
||||||
@@ -97,11 +104,6 @@ async function localSearch(searchTerm, roomId = undefined) {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const emptyResult = {
|
|
||||||
results: [],
|
|
||||||
highlights: [],
|
|
||||||
};
|
|
||||||
|
|
||||||
const result = MatrixClientPeg.get()._processRoomEventsSearch(
|
const result = MatrixClientPeg.get()._processRoomEventsSearch(
|
||||||
emptyResult, response);
|
emptyResult, response);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user