Fix empty descriptions throwing unexpected errors

This commit is contained in:
Kasper Seweryn 2022-09-01 19:59:41 +00:00 committed by Georg Krause
parent 0541da444b
commit e2be5662ef
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ const { activateTrack } = usePlayOptions(props)
const fetchData = async () => {
try {
const response = await axios.get(`tracks/${props.track.id}/`)
description.value = response.data.description.text
description.value = response.data.description?.text ?? ''
} catch (error) {
useErrorHandler(error as Error)
}