From b1b5c53b1e27fac7612e8c6c83867f63fc580eb9 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Wed, 27 Sep 2023 12:51:20 +0200 Subject: [PATCH] [PM-2014] fix: use `getCredentials$()` --- .../create-credential-dialog.component.ts | 6 +++--- .../webauthn-login-settings.component.ts | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-credential-dialog.component.ts b/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-credential-dialog.component.ts index 531515a949..cdecc9ebea 100644 --- a/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-credential-dialog.component.ts +++ b/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-credential-dialog.component.ts @@ -57,9 +57,9 @@ export class CreateCredentialDialogComponent implements OnInit { ) {} ngOnInit(): void { - this.hasPasskeys$ = this.webauthnService.credentials$.pipe( - map((credentials) => credentials.length > 0) - ); + this.hasPasskeys$ = this.webauthnService + .getCredentials$() + .pipe(map((credentials) => credentials.length > 0)); } protected submit = async () => { diff --git a/apps/web/src/app/auth/settings/webauthn-login-settings/webauthn-login-settings.component.ts b/apps/web/src/app/auth/settings/webauthn-login-settings/webauthn-login-settings.component.ts index 3c59bd30ed..98aa517b98 100644 --- a/apps/web/src/app/auth/settings/webauthn-login-settings/webauthn-login-settings.component.ts +++ b/apps/web/src/app/auth/settings/webauthn-login-settings/webauthn-login-settings.component.ts @@ -47,7 +47,8 @@ export class WebauthnLoginSettingsComponent implements OnInit, OnDestroy { } ngOnInit(): void { - this.webauthnService.credentials$ + this.webauthnService + .getCredentials$() .pipe(takeUntil(this.destroy$)) .subscribe((credentials) => (this.credentials = credentials));