1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-18 10:23:52 +00:00

Don't process null cipher cache

This commit is contained in:
Isaiah Inuwa
2026-01-12 12:44:16 -06:00
parent 056ef9044e
commit c1c8ff295b
2 changed files with 1 additions and 3 deletions

View File

@@ -99,9 +99,9 @@ export class DesktopAutofillService implements OnDestroy {
switchMap(([userId]) => this.cipherService.cipherViews$(userId)),
);
}),
debounceTime(100), // just a precaution to not spam the sync if there are multiple changes (we typically observe a null change)
// No filter for empty arrays here - we want to sync even if there are 0 items
filter((cipherViewMap) => cipherViewMap !== null),
debounceTime(100), // just a precaution to not spam the sync if there are multiple changes (we typically observe a null change)
mergeMap((cipherViewMap) => this.sync(Object.values(cipherViewMap ?? []))),
takeUntil(this.destroy$),

View File

@@ -192,7 +192,6 @@ export class Fido2AuthenticatorService<
}
const reencrypted = await this.cipherService.encrypt(cipher, activeUserId);
await this.cipherService.updateWithServer(reencrypted);
await this.cipherService.clearCache(activeUserId);
credentialId = fido2Credential.credentialId;
} catch (error) {
this.logService?.error(
@@ -335,7 +334,6 @@ export class Fido2AuthenticatorService<
);
const encrypted = await this.cipherService.encrypt(selectedCipher, activeUserId);
await this.cipherService.updateWithServer(encrypted);
await this.cipherService.clearCache(activeUserId);
}
const authenticatorData = await generateAuthData({