1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 05:13:29 +00:00

Removes clobbering emission of empty array. (#16682)

* Removes clobbering emission of empty array.

* Additional 'startWith' removal.
This commit is contained in:
Miles Blackwood
2025-10-09 15:47:58 -04:00
committed by GitHub
parent 6353d0e67c
commit 2a2a36ea70
3 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { combineLatest, map, Observable, startWith, switchMap } from "rxjs";
import { combineLatest, map, Observable, switchMap } from "rxjs";
import { CipherType } from "@bitwarden/common/vault/enums";
import { RestrictedItemTypesService } from "@bitwarden/common/vault/services/restricted-item-types.service";
@@ -205,7 +205,7 @@ export class AutofillSettingsService implements AutofillSettingsServiceAbstracti
this.showInlineMenuCardsState = this.stateProvider.getActive(SHOW_INLINE_MENU_CARDS);
this.showInlineMenuCards$ = combineLatest([
this.showInlineMenuCardsState.state$.pipe(map((x) => x ?? true)),
this.restrictedItemTypesService.restricted$.pipe(startWith([])),
this.restrictedItemTypesService.restricted$,
]).pipe(
map(
([enabled, restrictions]) =>

View File

@@ -1,4 +1,4 @@
import { Observable, combineLatest, map, shareReplay, startWith } from "rxjs";
import { Observable, combineLatest, map, shareReplay } from "rxjs";
import { ActiveUserState, GlobalState, StateProvider } from "../../../platform/state";
import { VaultSettingsService as VaultSettingsServiceAbstraction } from "../../abstractions/vault-settings/vault-settings.service";
@@ -31,7 +31,7 @@ export class VaultSettingsService implements VaultSettingsServiceAbstraction {
*/
readonly showCardsCurrentTab$: Observable<boolean> = combineLatest([
this.showCardsCurrentTabState.state$.pipe(map((x) => x ?? true)),
this.restrictedItemTypesService.restricted$.pipe(startWith([])),
this.restrictedItemTypesService.restricted$,
]).pipe(
map(
([enabled, restrictions]) =>