mirror of
https://github.com/bitwarden/browser
synced 2024-12-25 17:32:46 +01:00
Handle null values coming from state (#8784)
This commit is contained in:
parent
28a89ddb86
commit
f15bffb040
@ -1,4 +1,4 @@
|
||||
import { Observable, firstValueFrom } from "rxjs";
|
||||
import { Observable, firstValueFrom, map } from "rxjs";
|
||||
import { SemVer } from "semver";
|
||||
|
||||
import { ApiService } from "../../abstractions/api.service";
|
||||
@ -100,9 +100,9 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
this.decryptedCiphersState = this.stateProvider.getActive(DECRYPTED_CIPHERS);
|
||||
this.addEditCipherInfoState = this.stateProvider.getActive(ADD_EDIT_CIPHER_INFO_KEY);
|
||||
|
||||
this.localData$ = this.localDataState.state$;
|
||||
this.ciphers$ = this.encryptedCiphersState.state$;
|
||||
this.cipherViews$ = this.decryptedCiphersState.state$;
|
||||
this.localData$ = this.localDataState.state$.pipe(map((data) => data ?? {}));
|
||||
this.ciphers$ = this.encryptedCiphersState.state$.pipe(map((ciphers) => ciphers ?? {}));
|
||||
this.cipherViews$ = this.decryptedCiphersState.state$.pipe(map((views) => views ?? {}));
|
||||
this.addEditCipherInfo$ = this.addEditCipherInfoState.state$;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user