mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
refactor: write it like a normal if statement
This commit is contained in:
parent
3b8a800cd2
commit
ed74b2464a
1 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue