fix library update progress rendering (#210)

* Fix library update progress rendering

The websocket sends a list with mangas for each category (completed, running, pending) instead of a number.
This resulted in the progress to always be 0

* Prevent TypeError

The "UpdateStatus" can have a "statusMap" that contains not data.

Co-authored-by: schroda <github@dasch.simplelogin.com>
This commit is contained in:
Daniel
2023-01-01 17:58:23 +01:00
committed by GitHub
parent 2e3f57677e
commit 34bafee3aa
2 changed files with 7 additions and 5 deletions

6
src/typings.d.ts vendored
View File

@@ -197,9 +197,9 @@ interface IQueue {
interface IUpdateStatus {
running: boolean
statusMap: {
COMPLETE: number,
RUNNING: number,
PENDING: number
COMPLETE?: IManga[],
RUNNING?: IManga[],
PENDING?: IManga[]
}
}