Fix error when attachment type doesn't exist

This commit is contained in:
Andrew Kingston 2021-04-09 13:36:54 +01:00
parent 5d880cf4e2
commit 563694120b
1 changed files with 1 additions and 1 deletions

View File

@ -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>