From ef507cb2accab58f206ecd749063fcc9c3fd58a0 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Wed, 10 May 2023 11:34:13 +0200 Subject: [PATCH] [PM-2014] fix: loading state not being set properly --- .../web/src/app/auth/core/services/webauthn/webauthn.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/app/auth/core/services/webauthn/webauthn.service.ts b/apps/web/src/app/auth/core/services/webauthn/webauthn.service.ts index 80a580d4d6..5153ae1ab8 100644 --- a/apps/web/src/app/auth/core/services/webauthn/webauthn.service.ts +++ b/apps/web/src/app/auth/core/services/webauthn/webauthn.service.ts @@ -22,6 +22,7 @@ export class WebauthnService { private _loading$ = new BehaviorSubject(true); readonly credentials$ = this._refresh$.pipe( + tap(() => this._loading$.next(true)), switchMap(() => this.getCredentials$()), tap(() => this._loading$.next(false)), shareReplay({ bufferSize: 1, refCount: true }) @@ -104,7 +105,6 @@ export class WebauthnService { } private refresh() { - this._loading$.next(true); this._refresh$.next(); } }