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 ✨ Audrey ✨
parent f6b23ea6a7
commit 4f61f7ebb7
No known key found for this signature in database
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 () => {