Skip to content

Commit 857f10d

Browse files
authored
docs: update responsive breadcrumb example (#933)
1 parent 5ada562 commit 857f10d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/www/src/lib/registry/default/example/BreadcrumbResponsive.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const itemsToDisplay = 3
4242
const firstLabel = computed(() => items.value[0]?.label)
4343
4444
const allButLastTwoItems = computed(() => items.value.slice(1, -2))
45-
const remainingItems = computed(() => items.value.slice(-itemsToDisplay + 1))
45+
const remainingItems = computed(() => items.value.slice(-Math.min(itemsToDisplay, items.value.length) + 1))
4646
</script>
4747

4848
<template>

apps/www/src/lib/registry/new-york/example/BreadcrumbResponsive.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const itemsToDisplay = 3
4242
const firstLabel = computed(() => items.value[0]?.label)
4343
4444
const allButLastTwoItems = computed(() => items.value.slice(1, -2))
45-
const remainingItems = computed(() => items.value.slice(-itemsToDisplay + 1))
45+
const remainingItems = computed(() => items.value.slice(-Math.min(itemsToDisplay, items.value.length) + 1))
4646
</script>
4747

4848
<template>

0 commit comments

Comments
 (0)