Fix attachment undefined references

This commit is contained in:
Adria Navarro 2024-09-26 13:33:14 +02:00
parent 680cf5803d
commit 0c44f58466
1 changed files with 8 additions and 6 deletions

View File

@ -80,12 +80,14 @@
bind:this={anchor}
>
{#each value || [] as attachment}
{#if isImage(attachment.extension)}
<img src={attachment.url} alt={attachment.extension} />
{:else}
<div class="file" title={attachment.name}>
{attachment.extension}
</div>
{#if attachment}
{#if isImage(attachment.extension)}
<img src={attachment.url} alt={attachment.extension} />
{:else}
<div class="file" title={attachment.name}>
{attachment.extension}
</div>
{/if}
{/if}
{/each}
</div>