Skip to content

Commit

Permalink
Merge pull request #848 from intuitem/hotfix/null-answer-in-requireme…
Browse files Browse the repository at this point in the history
…nt-assessment

hotfix: null answer in requirement assessment
  • Loading branch information
nas-tabchiche authored Sep 19, 2024
2 parents 9ffb7a7 + 431b653 commit 3845808
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
</div>
</div>
{/if}
{#if Object.keys(requirementAssessment.answer).length !== 0}
{#if requirementAssessment.answer != null && Object.keys(requirementAssessment.answer).length !== 0}
<div class="flex flex-col w-full space-y-2">
{#each requirementAssessment.answer.questions as question}
<li class="flex flex-col space-y-2 rounded-xl">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
</svelte:fragment>
</TabGroup>
</div>
{#if Object.keys(data.requirementAssessment.answer).length !== 0}
{#if data.requirementAssessment.answer != null && Object.keys(data.requirementAssessment.answer).length !== 0}
<h1 class="font-semibold text-sm">{m.question()}</h1>
{#each data.requirementAssessment.answer.questions as question}
<li class="flex justify-between items-center border rounded-xl p-2 disabled">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
<HiddenInput {form} field="requirement" />
<HiddenInput {form} field="compliance_assessment" />
<div class="flex flex-col my-8 space-y-6">
{#if Object.keys(data.requirementAssessment.answer).length !== 0}
{#if data.requirementAssessment.answer != null && Object.keys(data.requirementAssessment.answer).length !== 0}
<Question {form} field="answer" label={m.question()} />
{/if}
<Select
Expand Down

0 comments on commit 3845808

Please sign in to comment.