Skip to content

Commit c4223fb

Browse files
committed
docs(app): remove useless mapping on navigation
1 parent 4be37f0 commit c4223fb

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

docs/app/app.vue

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,7 @@ const route = useRoute()
66
const appConfig = useAppConfig()
77
const colorMode = useColorMode()
88
9-
function mapPath(data) {
10-
return data.map((item) => {
11-
if (item.children) {
12-
item.children = mapPath(item.children)
13-
}
14-
return {
15-
...item,
16-
_path: item.path,
17-
}
18-
})
19-
}
20-
const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('docs'), {
21-
default: () => [],
22-
transform: mapPath,
23-
})
9+
const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('docs'))
2410
const { data: files } = await useAsyncData('search', () => queryCollectionSearchSections('docs'))
2511
2612
const searchTerm = ref('')

0 commit comments

Comments
 (0)