Skip to content

Commit

Permalink
fix(auto-catalog): fix index issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Dec 5, 2023
1 parent 2928a13 commit 20be00b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/auto-catalog/src/client/components/AutoCatalog.ts
Expand Up @@ -106,13 +106,17 @@ export default defineComponent({
router
.getRoutes()
.map(({ meta, path }) => {
const info = autoCatalogGetter(meta);

if (!info) return null;

const level = path.split("/").length;

return {
level: endsWith(path, "/") ? level - 2 : level - 1,
...autoCatalogGetter(meta),
base: path.replace(/\/[^/]+\/?$/, "/"),
path,
...info,
};
})
.filter(
Expand Down

0 comments on commit 20be00b

Please sign in to comment.