1
0
Fork 0
mirror of synced 2024-07-06 23:10:57 +12:00

Fix crash when no linked records in DataTable

This commit is contained in:
Andrew Kingston 2020-10-12 18:47:25 +01:00
parent da1936fbbf
commit 47e9cd64cb

View file

@ -100,7 +100,7 @@
{#if schema[header].type === 'attachment'} {#if schema[header].type === 'attachment'}
<AttachmentList files={row[header]} /> <AttachmentList files={row[header]} />
{:else if schema[header].type === 'link'} {:else if schema[header].type === 'link'}
<td>{row[header].length} related row(s)</td> <td>{row[header] ? row[header].length : 0} related row(s)</td>
{:else} {:else}
<td>{row[header] == null ? '' : row[header]}</td> <td>{row[header] == null ? '' : row[header]}</td>
{/if} {/if}