player: handle missing album id

This commit is contained in:
Thomas Amland 2020-09-19 17:42:30 +02:00
parent 30570ff662
commit 93503de065

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="d-flex player"> <div class="d-flex player">
<div v-if="track" class="d-none d-sm-block"> <div v-if="track" class="d-none d-sm-block">
<router-link :to="{name: 'album', params: {id: track.albumId}}"> <router-link :to="track.albumId ? {name: 'album', params: {id: track.albumId}} : ''">
<img v-if="track.image" width="80px" height="80px" :src="track.image"> <img v-if="track.image" width="80px" height="80px" :src="track.image">
<img v-else width="80px" height="80px" src="@/shared/assets/fallback.svg"> <img v-else width="80px" height="80px" src="@/shared/assets/fallback.svg">
</router-link> </router-link>