mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-13 02:07:12 -07:00
Set fallback values for statistics
This commit is contained in:
parent
2ee4a3346e
commit
f0eb626324
9 changed files with 33 additions and 23 deletions
|
@ -176,7 +176,7 @@ export const defaultState = {
|
|||
|
||||
const {
|
||||
trackCount = 0,
|
||||
trackFileCount
|
||||
trackFileCount = 0
|
||||
} = statistics;
|
||||
|
||||
const progress = trackCount ? trackFileCount / trackCount * 100 : 100;
|
||||
|
@ -201,7 +201,7 @@ export const defaultState = {
|
|||
albumCount: function(item) {
|
||||
const { statistics = {} } = item;
|
||||
|
||||
return statistics.albumCount;
|
||||
return statistics.albumCount || 0;
|
||||
},
|
||||
|
||||
trackCount: function(item) {
|
||||
|
@ -229,7 +229,7 @@ export const defaultState = {
|
|||
|
||||
const {
|
||||
trackCount = 0,
|
||||
trackFileCount
|
||||
trackFileCount = 0
|
||||
} = statistics;
|
||||
|
||||
const progress = trackCount ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue