Skip to content

Commit

Permalink
fix: Breadcrumbs types
Browse files Browse the repository at this point in the history
  • Loading branch information
netchampfaris committed Nov 16, 2024
1 parent d1388b7 commit 14b685c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/Breadcrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@ const dropdownItems = computed(() => {
let allExceptLastTwo = items.value.slice(0, -2)
return allExceptLastTwo.map((item) => {
let onClick = item.onClick ? item.onClick : () => router.push(item.route)
let onClick = () => {
if (item.route) {
router.push(item.route)
} else if (item.onClick) {
item.onClick()
}
}
return {
...item,
icon: null,
Expand Down

0 comments on commit 14b685c

Please sign in to comment.