Fix error when attachment type doesn't exist
This commit is contained in:
parent
aa2cd7fbba
commit
372a8ac944
|
@ -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