Skip to content

Commit 8a226ab

Browse files
authored
docs(i18n): Handle slug as array in computed property (#3703)
1 parent d9e8a6a commit 8a226ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/content/docs/7.integrations/01.i18n.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ import type { Collections } from '@nuxt/content'
8888
8989
const route = useRoute()
9090
const { locale } = useI18n()
91-
const slug = computed(() => withLeadingSlash(String(route.params.slug)))
91+
const slug = computed(() => Array.isArray(route.params.slug) ? withLeadingSlash(String(route.params.slug.join('/'))) : withLeadingSlash(String(route.params.slug)))
9292
9393
const { data: page } = await useAsyncData('page-' + slug.value, async () => {
9494
// Build collection name based on current locale

0 commit comments

Comments
 (0)