Fix error when attachment type doesn't exist
This commit is contained in:
parent
5d880cf4e2
commit
563694120b
|
@ -7,7 +7,7 @@
|
|||
</script>
|
||||
|
||||
{#each attachments as attachment}
|
||||
{#if attachment.type.startsWith('image')}
|
||||
{#if attachment.type?.startsWith('image')}
|
||||
<img src={attachment.url} alt={attachment.extension} />
|
||||
{:else}
|
||||
<div class="file">{attachment.extension}</div>
|
||||
|
|
Loading…
Reference in New Issue