Skip to content

Commit

Permalink
Fix getPageTitle function
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Dec 20, 2024
1 parent d596d06 commit c57c77b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
function getPageTitle(): string {
return safeTranslate(
$page.data.title || $page.data.str || $page.data.name || $breadcrumbs.length > 1
? $breadcrumbs[$breadcrumbs.length - 1]?.label
: (URL_MODEL_MAP[$page.url.pathname.split('/').pop() as string]?.verboseNamePlural ??
$page.url.pathname.split('/').pop())
$page.data.title ??
($page.data.str || $page.data.name || $breadcrumbs.length > 1
? $breadcrumbs[$breadcrumbs.length - 1]?.label
: URL_MODEL_MAP[$page.url.pathname.split('/').pop() as string]?.verboseNamePlural)
);
}
Expand Down

0 comments on commit c57c77b

Please sign in to comment.