mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
SearchStore: only use the external search if the socket is open
This commit is contained in:
parent
4e6549407e
commit
714391b807
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ class SearchStore implements EventStore {
|
||||||
this.#debug('REQ', JSON.stringify(filters));
|
this.#debug('REQ', JSON.stringify(filters));
|
||||||
const query = filters[0]?.search;
|
const query = filters[0]?.search;
|
||||||
|
|
||||||
if (this.#relay) {
|
if (this.#relay && this.#relay.socket.readyState === WebSocket.OPEN) {
|
||||||
this.#debug(`Searching for "${query}" at ${this.#relay.socket.url}...`);
|
this.#debug(`Searching for "${query}" at ${this.#relay.socket.url}...`);
|
||||||
|
|
||||||
const sub = this.#relay.req(filters, opts);
|
const sub = this.#relay.req(filters, opts);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue