mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-18 21:04:23 +01:00
refactor: write it like a normal if statement
This commit is contained in:
@@ -96,8 +96,11 @@ async function searchEvents({ q, type, limit, account_id }: SearchQuery, signal:
|
||||
|
||||
pubkeys.push(...(await getPubkeysBySearch(kysely, { q, limit })));
|
||||
|
||||
if (!filter?.authors) filter.authors = pubkeys;
|
||||
else filter.authors.push(...pubkeys);
|
||||
if (!filter?.authors) {
|
||||
filter.authors = pubkeys;
|
||||
} else {
|
||||
filter.authors.push(...pubkeys);
|
||||
}
|
||||
|
||||
filter.search = undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user