Fixed: Artist Statistics throwing errors when null

pull/455/head
Qstick 6 years ago
parent 93a0f18f82
commit 15672298c6

@ -23,10 +23,9 @@ class AlbumStudioAlbum extends Component {
render() {
const {
id,
title,
monitored,
statistics = {},
statistics,
isSaving
} = this.props;

@ -619,6 +619,7 @@ ArtistDetails.propTypes = {
};
ArtistDetails.defaultProps = {
statistics: {},
isSaving: false
};

@ -61,7 +61,7 @@ class ArtistIndexBanner extends Component {
status,
foreignArtistId,
nextAiring,
statistics = {},
statistics,
images,
bannerWidth,
bannerHeight,
@ -244,8 +244,12 @@ ArtistIndexBanner.propTypes = {
};
ArtistIndexBanner.defaultProps = {
trackCount: 0,
trackFileCount: 0
statistics: {
albumCount: 0,
trackCount: 0,
trackFileCount: 0,
totalTrackCount: 0
}
};
export default ArtistIndexBanner;

@ -253,8 +253,12 @@ ArtistIndexOverview.propTypes = {
};
ArtistIndexOverview.defaultProps = {
trackCount: 0,
trackFileCount: 0
statistics: {
albumCount: 0,
trackCount: 0,
trackFileCount: 0,
totalTrackCount: 0
}
};
export default ArtistIndexOverview;

@ -61,7 +61,7 @@ class ArtistIndexPoster extends Component {
foreignArtistId,
status,
nextAiring,
statistics = {},
statistics,
images,
posterWidth,
posterHeight,
@ -243,8 +243,12 @@ ArtistIndexPoster.propTypes = {
};
ArtistIndexPoster.defaultProps = {
trackCount: 0,
trackFileCount: 0
statistics: {
albumCount: 0,
trackCount: 0,
trackFileCount: 0,
totalTrackCount: 0
}
};
export default ArtistIndexPoster;

@ -416,8 +416,12 @@ ArtistIndexRow.propTypes = {
};
ArtistIndexRow.defaultProps = {
trackCount: 0,
trackFileCount: 0
statistics: {
albumCount: 0,
trackCount: 0,
trackFileCount: 0,
totalTrackCount: 0
}
};
export default ArtistIndexRow;

Loading…
Cancel
Save