mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-28 02:34:25 +01:00
SearchStore: bail early for empty filters
This commit is contained in:
@@ -35,6 +35,10 @@ class SearchStore implements EventStore {
|
||||
opts?: GetEventsOpts | undefined,
|
||||
): Promise<DittoEvent<K>[]> {
|
||||
filters = normalizeFilters(filters);
|
||||
|
||||
if (opts?.signal?.aborted) return Promise.resolve([]);
|
||||
if (!filters.length) return Promise.resolve([]);
|
||||
|
||||
this.#debug('REQ', JSON.stringify(filters));
|
||||
const query = filters[0]?.search;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user