mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
Bugfix/marketplace add (#1805)
* remove falsey check when getting marketplaces, as no alts could exist * filter boolean but start with object Co-authored-by: Matt Hill <matthewonthemoon@gmail.com>
This commit is contained in:
@@ -3,10 +3,18 @@ import {
|
||||
DataModel,
|
||||
UIMarketplaceData,
|
||||
} from 'src/app/services/patch-db/data-model'
|
||||
import { filter, firstValueFrom } from 'rxjs'
|
||||
import { filter, firstValueFrom, startWith } from 'rxjs'
|
||||
|
||||
export function getMarketplace(
|
||||
patch: PatchDB<DataModel>,
|
||||
): Promise<UIMarketplaceData> {
|
||||
return firstValueFrom(patch.watch$('ui', 'marketplace').pipe(filter(Boolean)))
|
||||
return firstValueFrom(
|
||||
patch.watch$('ui', 'marketplace').pipe(
|
||||
filter(Boolean),
|
||||
startWith({
|
||||
'selected-id': null,
|
||||
'known-hosts': {},
|
||||
}),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user