1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 05:43:41 +00:00

encapsulate kludge property to fix invalid credential type error (#15225)

This commit is contained in:
✨ Audrey ✨
2025-06-20 09:44:38 -04:00
committed by GitHub
parent 73e5aab7e4
commit 8a8d02b7db
2 changed files with 9 additions and 1 deletions

View File

@@ -161,6 +161,14 @@ export class UserStateSubject<
this.outputSubscription = userState$
.pipe(
switchMap((userState) => userState.state$),
map((stored) => {
if (stored && typeof stored === "object" && ALWAYS_UPDATE_KLUDGE in stored) {
// related: ALWAYS_UPDATE_KLUDGE FIXME
delete stored[ALWAYS_UPDATE_KLUDGE];
}
return stored;
}),
this.declassify(encryptor$),
this.adjust(combineLatestWith(constraints$)),
takeUntil(anyComplete(account$)),

View File

@@ -172,7 +172,7 @@ describe("GeneratorProfileProvider", () => {
await awaitAsync();
const result = await firstValueFrom(stateProvider.getUserState$(SettingsKey, SomeUser));
expect(result).toEqual({ foo: "next value" });
expect(result).toMatchObject({ foo: "next value" });
});
it("waits for the user to become available", async () => {