mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
undefined bug fix
This commit is contained in:
committed by
Aiden McClelland
parent
d809e175db
commit
b3a4ebcf53
@@ -73,7 +73,7 @@ export class AppListPage {
|
||||
},
|
||||
statusRendering: renderPkgStatus(pkgs[id].state, pkgs[id].installed?.status),
|
||||
sub: null,
|
||||
installProgress: this.installPackageService.transform(pkgs[id]['install-progress']),
|
||||
installProgress: !isEmptyObject(pkgs[id]['install-progress']) ? this.installPackageService.transform(pkgs[id]['install-progress']) : undefined,
|
||||
}
|
||||
// subscribe to pkg
|
||||
this.pkgs[id].sub = this.patch.watch$('package-data', id).subscribe(pkg => {
|
||||
|
||||
@@ -62,7 +62,8 @@ export class AppShowPage {
|
||||
this.patch.watch$('package-data', this.pkgId)
|
||||
.subscribe(pkg => {
|
||||
this.pkg = pkg
|
||||
this.installProgress = this.packageLoadingService.transform(this.pkg['install-progress'])
|
||||
console.log('isnt empty', !isEmptyObject(pkg['install-progress']))
|
||||
this.installProgress = !isEmptyObject(pkg['install-progress']) ? this.packageLoadingService.transform(pkg['install-progress']) : undefined
|
||||
this.rendering = renderPkgStatus(pkg.state, pkg.installed?.status)
|
||||
this.mainStatus = { ...pkg.installed?.status.main }
|
||||
}),
|
||||
|
||||
@@ -23,7 +23,7 @@ export class PackageLoadingService {
|
||||
validateWeight * validated +
|
||||
unpackWeight * unpacked)
|
||||
|
||||
const denominator = Math.floor(loadData.size * (downloadWeight + validateWeight + unpackWeight))
|
||||
const denominator = Math.floor(size * (downloadWeight + validateWeight + unpackWeight))
|
||||
|
||||
return {
|
||||
totalProgress: Math.round(100 * numerator / denominator),
|
||||
|
||||
Reference in New Issue
Block a user