Fix #422: Do not display "view on MusicBrainz" button if we miss the mbid

This commit is contained in:
Eliot Berriot 2018-10-20 16:20:29 +02:00
parent a8f7893def
commit 10fff6ea67
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
4 changed files with 13 additions and 6 deletions

View file

@ -33,7 +33,7 @@
<i class="wikipedia icon"></i>
<translate>Search on Wikipedia</translate>
</a>
<a :href="musicbrainzUrl" target="_blank" class="ui button">
<a v-if="musicbrainzUrl" :href="musicbrainzUrl" target="_blank" class="ui button">
<i class="external icon"></i>
<translate>View on MusicBrainz</translate>
</a>
@ -105,7 +105,9 @@ export default {
return 'https://en.wikipedia.org/w/index.php?search=' + encodeURI(this.album.title + ' ' + this.album.artist.name)
},
musicbrainzUrl () {
return 'https://musicbrainz.org/release/' + this.album.mbid
if (this.album.mbid) {
return 'https://musicbrainz.org/release/' + this.album.mbid
}
},
headerStyle () {
if (!this.album.cover.original) {