Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaAmega committed Dec 5, 2024
1 parent 4d0e477 commit ec2f816
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions ui/packages/evidently-ui-lib/src/router-utils/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,18 @@ export const useCrumbsFromHandle = () => {
return crumb.title
}

if (crumb.param && params[crumb.param]) {
return params[crumb.param]
if (crumb.param) {
const c = params?.[crumb.param]
if (c) {
return c
}
}

if (
crumb.keyFromLoaderData &&
typeof data === 'object' &&
data &&
(data as Record<string, string>)[crumb.keyFromLoaderData]
) {
return (data as Record<string, string>)[crumb.keyFromLoaderData]
if (crumb.keyFromLoaderData && typeof data === 'object' && data) {
const c = (data as Record<string, string>)?.[crumb.keyFromLoaderData]
if (c) {
return c
}
}

return 'undefined'
Expand Down

0 comments on commit ec2f816

Please sign in to comment.