1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-30 13:03:53 +01:00

Fix null search service checking (#372)

* Do not reset Search Index if SearchService is null

* Check lambda exists

* Fix Chalk
This commit is contained in:
Matt Gibson 2021-05-10 09:52:45 -05:00 committed by GitHub
parent 2750ca7586
commit 2cf5d767b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -296,7 +296,7 @@ export class CipherService implements CipherServiceAbstraction {
async getAllDecrypted(): Promise<CipherView[]> { async getAllDecrypted(): Promise<CipherView[]> {
if (this.decryptedCipherCache != null) { if (this.decryptedCipherCache != null) {
const userId = await this.userService.getUserId(); const userId = await this.userService.getUserId();
if ((this.searchService().indexedEntityId ?? userId) !== userId) if (this.searchService != null && (this.searchService().indexedEntityId ?? userId) !== userId)
{ {
await this.searchService().indexCiphers(userId, this.decryptedCipherCache); await this.searchService().indexCiphers(userId, this.decryptedCipherCache);
} }