Fix CSP for remote instances

This commit is contained in:
wvffle 2022-09-26 18:34:13 +00:00
commit 306a2e9738
2 changed files with 7 additions and 3 deletions

View file

@ -45,7 +45,7 @@
}
if (type === 'artist') {
fetchArtistCover(id)
fetchArtistCover(id).catch(() => undefined)
}
// Tracks
@ -111,6 +111,7 @@
if (response.status > 299) {
switch (response.status) {
case 400:
case 404:
error.value = `${type} not found.`
break
@ -162,7 +163,10 @@
// NOTE: Fetch tracks only if there is no error
if (error.value === false) {
fetchTracks()
fetchTracks().catch(err => {
console.error(err)
error.value = `An unknown error occurred while loading ${type} data.`
})
}
// Duration