From dc5b6f81e5c8349c9510025ca30618304963fc1c Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Mon, 15 Apr 2024 17:07:34 +0200 Subject: [PATCH] Only display the first_name+last_name combination for the user views breadcrumb --- frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte index 4480f1c83..7a537f57b 100644 --- a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte +++ b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte @@ -31,11 +31,8 @@ if (t === $breadcrumbObject.id) { if ($breadcrumbObject.name) { t = $breadcrumbObject.name; - } else if ($breadcrumbObject.first_name) { - t = $breadcrumbObject.first_name; - if ($breadcrumbObject.last_name) { - t = `${t} ${$breadcrumbObject.last_name}`; - } + } else if ($breadcrumbObject.first_name && $breadcrumbObject.last_name) { + t = `${$breadcrumbObject.first_name} ${$breadcrumbObject.last_name}`; } else { t = $breadcrumbObject.email; }