mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-14 11:04:18 +01:00
refactor(accountSearchController): only reassign events if event is undefined
This commit is contained in:
@@ -141,10 +141,11 @@ const accountSearchController: AppController = async (c) => {
|
||||
signal,
|
||||
});
|
||||
|
||||
events = pubkeys.map((pubkey) => {
|
||||
return events.find((event) => event.pubkey === pubkey);
|
||||
}).filter((event) => event !== undefined);
|
||||
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user