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:
@@ -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]) =>
|
||||
|
||||
@@ -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]) =>
|
||||
|
||||
Reference in New Issue
Block a user