mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
loading progress NaN fix
This commit is contained in:
committed by
Aiden McClelland
parent
d38da2231e
commit
c9d77e99af
@@ -646,38 +646,29 @@ export class MockApiService extends ApiService {
|
||||
if (i === initialProgress.size) {
|
||||
initialProgress[phase.completion] = true
|
||||
}
|
||||
let patch: any
|
||||
if (initialProgress['unpack-complete']) {
|
||||
patch = [
|
||||
{
|
||||
op: PatchOp.REMOVE,
|
||||
path: `/package-data/${id}/install-progress`,
|
||||
},
|
||||
// {
|
||||
// op: PatchOp.REMOVE,
|
||||
// path: `/recovered-packages/${id}`,
|
||||
// } as RemoveOperation,
|
||||
]
|
||||
} else {
|
||||
patch = [
|
||||
{
|
||||
op: PatchOp.REPLACE,
|
||||
path: `/package-data/${id}/install-progress`,
|
||||
value: initialProgress,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
const patch = [
|
||||
{
|
||||
op: PatchOp.REPLACE,
|
||||
path: `/package-data/${id}/install-progress`,
|
||||
value: initialProgress,
|
||||
},
|
||||
]
|
||||
this.updateMock(patch)
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
const patch2 = [
|
||||
const patch2: any = [
|
||||
{
|
||||
op: PatchOp.REPLACE,
|
||||
path: `/package-data/${id}`,
|
||||
value: Mock.LocalPkgs[id],
|
||||
},
|
||||
{
|
||||
op: PatchOp.REMOVE,
|
||||
path: `/package-data/${id}/install-progress`,
|
||||
},
|
||||
]
|
||||
this.updateMock(patch2)
|
||||
}, 1000)
|
||||
|
||||
Reference in New Issue
Block a user