1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

Fix desktop windows autotype disabled on first login (#16669)

This commit is contained in:
neuronull
2025-10-01 07:30:03 -06:00
committed by GitHub
parent c2fbd3eb7e
commit 177481935f

View File

@@ -1,6 +1,6 @@
import { combineLatest, filter, firstValueFrom, map, Observable, of, switchMap } from "rxjs";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { Account, AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions";
@@ -109,9 +109,9 @@ export class DesktopAutotypeService {
switchMap((userId) => this.authService.authStatusFor$(userId)),
),
this.accountService.activeAccount$.pipe(
map((activeAccount) => activeAccount?.id),
switchMap((userId) =>
this.billingAccountProfileStateService.hasPremiumFromAnySource$(userId),
filter((account): account is Account => !!account),
switchMap((account) =>
this.billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),
),
),
]).pipe(