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} bind:this={anchor}
> >
{#each value || [] as attachment} {#each value || [] as attachment}
{#if isImage(attachment.extension)} {#if attachment}
<img src={attachment.url} alt={attachment.extension} /> {#if isImage(attachment.extension)}
{:else} <img src={attachment.url} alt={attachment.extension} />
<div class="file" title={attachment.name}> {:else}
{attachment.extension} <div class="file" title={attachment.name}>
</div> {attachment.extension}
</div>
{/if}
{/if} {/if}
{/each} {/each}
</div> </div>