fix: unset cover image when the task does not have one
This commit is contained in:
parent
3d88fdaadd
commit
054d70cbe5
1 changed files with 1 additions and 1 deletions
|
@ -129,12 +129,12 @@ const coverImageBlobUrl = ref<string | null>(null)
|
|||
|
||||
async function maybeDownloadCoverImage() {
|
||||
if (!props.task.coverImageAttachmentId) {
|
||||
coverImageBlobUrl.value = null
|
||||
return
|
||||
}
|
||||
|
||||
const attachment = props.task.attachments.find(a => a.id === props.task.coverImageAttachmentId)
|
||||
if (!attachment || !SUPPORTED_IMAGE_SUFFIX.some((suffix) => attachment.file.name.endsWith(suffix))) {
|
||||
console.log('not an attachment')
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue