Skip to content

Commit

Permalink
Handle case where score_definition description is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Apr 26, 2024
1 parent 2d12d5d commit 52cd4aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lib/components/Forms/Score.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
{#each score_definition as definition}
{#if definition.score === $value}
<p class="w-full max-w-[80ch]">
{definition.name}: {definition.description}
{definition.name}{definition.description ? `: ${definition.description}` : ''}
</p>
{/if}
{/each}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/routes/(app)/frameworks/[id=uuid]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
{:else if key === 'score_definition'}
{#each Object.entries(value) as [key, definition]}
<div>
{definition.score}. {definition.name}: {definition.description}
{definition.score}.
{definition.name}{definition.description ? `: ${definition.description}` : ''}
</div>
{/each}
{:else if Array.isArray(value)}
Expand Down

0 comments on commit 52cd4aa

Please sign in to comment.