From 28e095c9dd937bb854bd3cabeeae9bad5e202593 Mon Sep 17 00:00:00 2001 From: Steven Tan Date: Fri, 8 May 2020 17:04:47 -0500 Subject: [PATCH] Fixed crash on song details if no metadata exists on the details object. --- src/components/SongDetails.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SongDetails.js b/src/components/SongDetails.js index e85567a..5d5220d 100644 --- a/src/components/SongDetails.js +++ b/src/components/SongDetails.js @@ -187,7 +187,7 @@ class SongDetails extends Component {
{ this.props.details.songName || this.props.details._songName || this.props.details.metadata.songName }
{ this.props.details.songSubName || this.props.details._songSubName || this.props.details.metadata ? this.props.details.metadata.songSubName : '' }
-
{ this.props.details.authorName || this.props.details.songAuthorName || this.props.details._songAuthorName || this.props.details.metadata.songAuthorName }
+
{ this.props.details.authorName || this.props.details.songAuthorName || this.props.details._songAuthorName || (this.props.details.metadata ? this.props.details.metadata.songAuthorName : '')}
{this.props.downloadedSongs.some(song => song.hash === this.props.details.hash) ?
This song is in your library.
: null}
{(!!this.props.details.file || this.props.downloadedSongs.some(song => song.hash === this.props.details.hash)) ?