diff --git a/src/services/cipher.service.ts b/src/services/cipher.service.ts index 39a9cb2f12e..04abfc97d30 100644 --- a/src/services/cipher.service.ts +++ b/src/services/cipher.service.ts @@ -296,7 +296,7 @@ export class CipherService implements CipherServiceAbstraction { async getAllDecrypted(): Promise { if (this.decryptedCipherCache != null) { 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); }