mirror of
https://github.com/bitwarden/clients.git
synced 2025-12-10 00:08:42 -06:00
encapsulate kludge property to fix invalid credential type error (#15225)
This commit is contained in:
parent
f6b23ea6a7
commit
4f61f7ebb7
@ -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$)),
|
||||
|
||||
@ -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 () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user