1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-30 16:23:53 +00:00

Fix caching issue on browser extension when using SDK cipher ops.

This commit is contained in:
Nik Gilmore
2026-01-06 14:24:46 -08:00
parent a19e37e312
commit ba238984b5

View File

@@ -910,7 +910,7 @@ export class CipherService implements CipherServiceAbstraction {
userId: UserId,
orgAdmin?: boolean,
): Promise<CipherView | void> {
return firstValueFrom(
const resultCipherView = firstValueFrom(
this.sdkService.userClient$(userId).pipe(
map(async (sdk) => {
if (!sdk) {
@@ -932,6 +932,8 @@ export class CipherService implements CipherServiceAbstraction {
}),
),
);
await this.clearCache(userId);
return resultCipherView;
}
private async createWithServer_legacy(
@@ -986,7 +988,7 @@ export class CipherService implements CipherServiceAbstraction {
originalCipherView?: CipherView,
orgAdmin?: boolean,
): Promise<CipherView> {
return firstValueFrom(
const resultCipherView = firstValueFrom(
this.sdkService.userClient$(userId).pipe(
map(async (sdk) => {
if (!sdk) {
@@ -1012,6 +1014,8 @@ export class CipherService implements CipherServiceAbstraction {
}),
),
);
await this.clearCache(userId);
return resultCipherView;
}
async updateWithServer_legacy(