From fa84b2efefa81b153bb3e879cb4c44168ebf7bb7 Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Tue, 9 Apr 2024 13:31:54 +0200 Subject: [PATCH] Update +page.svelte --- .../(app)/requirement-assessments/[id=uuid]/+page.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/routes/(app)/requirement-assessments/[id=uuid]/+page.svelte b/frontend/src/routes/(app)/requirement-assessments/[id=uuid]/+page.svelte index 71fbfba73..44095b514 100644 --- a/frontend/src/routes/(app)/requirement-assessments/[id=uuid]/+page.svelte +++ b/frontend/src/routes/(app)/requirement-assessments/[id=uuid]/+page.svelte @@ -45,13 +45,13 @@ child_pattern == 2 ? data.requirement.ref_id : child_pattern == 1 ? data.requirement.name : ''; - const parent_pattern = (data.parent.ref_id ? 2 : 0) + (data.parent.name ? 1 : 0) + const parent_pattern = data.parent ? ((data.parent.ref_id ? 2 : 0) + (data.parent.name ? 1 : 0)) : 0 const parent_title: string = parent_pattern == 3 ? `${data.parent.ref_id} - ${data.parent.name}` : parent_pattern == 2 ? data.parent.ref_id : parent_pattern == 1 ? data.parent.name : ''; - - const title = parent_pattern + child_title; + console.log("coucou", data.parent) + const title = parent_title + child_title; breadcrumbObject.set({ id: data.requirementAssessment.id, name: title ?? 'Requirement assessment',