refactor: write it like a normal if statement

This commit is contained in:
P. Reis 2024-09-15 17:42:26 -03:00
parent 3b8a800cd2
commit ed74b2464a

View file

@ -96,8 +96,11 @@ async function searchEvents({ q, type, limit, account_id }: SearchQuery, signal:
pubkeys.push(...(await getPubkeysBySearch(kysely, { q, limit }))); pubkeys.push(...(await getPubkeysBySearch(kysely, { q, limit })));
if (!filter?.authors) filter.authors = pubkeys; if (!filter?.authors) {
else filter.authors.push(...pubkeys); filter.authors = pubkeys;
} else {
filter.authors.push(...pubkeys);
}
filter.search = undefined; filter.search = undefined;
} }