Fix empty descriptions throwing unexpected errors
This commit is contained in:
parent
0541da444b
commit
e2be5662ef
|
@ -53,7 +53,7 @@ const { activateTrack } = usePlayOptions(props)
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(`tracks/${props.track.id}/`)
|
const response = await axios.get(`tracks/${props.track.id}/`)
|
||||||
description.value = response.data.description.text
|
description.value = response.data.description?.text ?? ''
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
useErrorHandler(error as Error)
|
useErrorHandler(error as Error)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue