diff options
author | delucis | 2023-09-27 11:19:40 +0000 |
---|---|---|
committer | fredkbot | 2023-09-27 11:19:40 +0000 |
commit | 608937285596d9ff8030df219bc279e1ae107742 (patch) | |
tree | 6f9a5159b21ab90b10428383819dc792c7ebff89 | |
parent | 006d60695761ec10e5c4e715ed2212cd1fbedda0 (diff) | |
download | IT.starlight-608937285596d9ff8030df219bc279e1ae107742.tar.gz IT.starlight-608937285596d9ff8030df219bc279e1ae107742.tar.bz2 IT.starlight-608937285596d9ff8030df219bc279e1ae107742.zip |
[ci] format
-rw-r--r-- | packages/starlight/utils/routing.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/starlight/utils/routing.ts b/packages/starlight/utils/routing.ts index 6af940c8..496578ce 100644 --- a/packages/starlight/utils/routing.ts +++ b/packages/starlight/utils/routing.ts @@ -35,10 +35,12 @@ interface Path extends GetStaticPathsItem { const normalizeIndexSlug = (slug: string) => (slug === 'index' ? '' : slug); /** All entries in the docs content collection. */ - const docs: StarlightDocsEntry[] = (await getCollection('docs') ?? []).map(({ slug, ...entry }) => ({ - ...entry, - slug: normalizeIndexSlug(slug), -})); +const docs: StarlightDocsEntry[] = ((await getCollection('docs')) ?? []).map( + ({ slug, ...entry }) => ({ + ...entry, + slug: normalizeIndexSlug(slug), + }) +); function getRoutes(): Route[] { const routes: Route[] = docs.map((entry) => ({ |