fix(dashboard): fix parsing error when group display name not present (#537)

This commit is contained in:
repository 2023-03-20 19:24:48 -07:00 committed by GitHub
parent 89d7d11b69
commit e6da70de6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,8 @@
import Svelecte, { addFormatter } from 'svelecte';
import AwaitHtml from '../common/AwaitHtml.svelte';
import parseMarkdown from '../../api/parse-markdown';
import AwaitHtml from '../common/AwaitHtml.svelte';
import parseMarkdown from '../../api/parse-markdown';
import FaFolderOpen from 'svelte-icons/fa/FaFolderOpen.svelte'
import FaFolderPlus from 'svelte-icons/fa/FaFolderPlus.svelte'
@ -116,7 +118,7 @@
{#if finalGroupsList && finalGroupsList.length > 0}
<ListGroup>
{#each finalGroupsList as group, index (group.id)}
<ListGroupItem class="d-flex"><span bind:this={listGroupElements[index]} class="d-flex justify-content-between flex-grow-1"><span><b>{group.name}</b> (<code>{group.id}</code>)</span> <span><AwaitHtml htmlPromise={parseMarkdown(group.display_name)} /></span></span></ListGroupItem>
<ListGroupItem class="d-flex"><span bind:this={listGroupElements[index]} class="d-flex justify-content-between flex-grow-1"><span><b>{group.name}</b> (<code>{group.id}</code>)</span> <span><AwaitHtml htmlPromise={group.display_name ? parseMarkdown(group.display_name) : Promise.resolve("")} /></span></span></ListGroupItem>
{/each}
</ListGroup>
{:else}