mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
refactor(accountSearchController): only reassign events if event is undefined
This commit is contained in:
parent
ed74b2464a
commit
c5711ea071
1 changed files with 5 additions and 4 deletions
|
|
@ -141,10 +141,11 @@ const accountSearchController: AppController = async (c) => {
|
|||
signal,
|
||||
});
|
||||
|
||||
if (!event) {
|
||||
events = pubkeys.map((pubkey) => {
|
||||
return events.find((event) => event.pubkey === pubkey);
|
||||
}).filter((event) => event !== undefined);
|
||||
|
||||
}
|
||||
const accounts = await hydrateEvents({ events, store, signal }).then(
|
||||
(events) =>
|
||||
Promise.all(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue