1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-02 08:40:08 +01:00

delay search if indexing

This commit is contained in:
Kyle Spearrin 2019-07-23 08:28:53 -04:00
parent f406a01900
commit 15cf7b433a

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