delay search if indexing

This commit is contained in:
Kyle Spearrin 2019-07-23 08:28:53 -04:00
parent f406a01900
commit 15cf7b433a
1 changed files with 7 additions and 0 deletions

View File

@ -92,6 +92,13 @@ export class SearchService implements SearchServiceAbstraction {
return ciphers;
}
if (this.indexing) {
await new Promise((r) => setTimeout(r, 250));
if (this.indexing) {
await new Promise((r) => setTimeout(r, 500));
}
}
const index = this.getIndexForSearch();
if (index == null) {
// Fall back to basic search if index is not available