docs: fix refactor

This commit is contained in:
Benjamin Canac
2024-09-12 15:22:10 +02:00
parent 5076b8cc9e
commit ad77a0e82d
5 changed files with 5 additions and 10 deletions

View File

@@ -32,8 +32,7 @@ const props = defineProps<{
const route = useRoute()
const { $prettier } = useNuxtApp()
const slug = Array.isArray(route.params.slug) ? route.params.slug[0] ?? '' : route.params.slug ?? ''
const camelName = camelCase(slug[slug.length - 1] ?? '')
const camelName = camelCase(route.params.slug?.[route.params.slug.length - 1] ?? '')
const name = `U${upperFirst(camelName)}`
const componentProps = reactive({ ...(props.props || {}) })