mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 22:39:46 +00:00
fix a few, more to go (#2869)
* fix a few, more to go * chore: comments (#2871) * chore: comments * chore: typo * chore: stricter typescript (#2872) * chore: comments * chore: stricter typescript --------- Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com> * minor styling --------- Co-authored-by: Alex Inkin <alexander@inkin.ru>
This commit is contained in:
@@ -249,20 +249,23 @@ export class MarketplaceService {
|
||||
flavor: string | null,
|
||||
pkgInfo: GetPackageRes,
|
||||
): MarketplacePkg {
|
||||
version =
|
||||
const ver =
|
||||
version ||
|
||||
Object.keys(pkgInfo.best).find(v => this.exver.getFlavor(v) === flavor) ||
|
||||
null
|
||||
const best = ver && pkgInfo.best[ver]
|
||||
|
||||
return !version || !pkgInfo.best[version]
|
||||
? ({} as MarketplacePkg)
|
||||
: {
|
||||
id,
|
||||
version,
|
||||
flavor,
|
||||
...pkgInfo,
|
||||
...pkgInfo.best[version],
|
||||
}
|
||||
if (!best) {
|
||||
return {} as MarketplacePkg
|
||||
}
|
||||
|
||||
return {
|
||||
id,
|
||||
flavor,
|
||||
version: ver || '',
|
||||
...pkgInfo,
|
||||
...best,
|
||||
}
|
||||
}
|
||||
|
||||
getRequestErrors$(): Observable<string[]> {
|
||||
|
||||
Reference in New Issue
Block a user