Fix error when attachment type doesn't exist

This commit is contained in:
Andrew Kingston 2021-04-09 13:36:54 +01:00
parent aa2cd7fbba
commit 372a8ac944
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@
</script> </script>
{#each attachments as attachment} {#each attachments as attachment}
{#if attachment.type.startsWith('image')} {#if attachment.type?.startsWith('image')}
<img src={attachment.url} alt={attachment.extension} /> <img src={attachment.url} alt={attachment.extension} />
{:else} {:else}
<div class="file">{attachment.extension}</div> <div class="file">{attachment.extension}</div>