From d8bf06022a86c4b6e358b496a56cb1874a10c66d Mon Sep 17 00:00:00 2001 From: Evorp <3vorpgaming@gmail.com> Date: Mon, 19 Aug 2024 21:17:01 -0700 Subject: [PATCH] faster category collapsing --- .vitepress/computeCategories.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.vitepress/computeCategories.ts b/.vitepress/computeCategories.ts index 29ed8b0..808a6c2 100644 --- a/.vitepress/computeCategories.ts +++ b/.vitepress/computeCategories.ts @@ -70,8 +70,7 @@ export default function computeCategories(dir: string) { }, [] as DocCategory[]) .map((category) => { // collapse categories that are entirely archived/deprecated by default - if (category.items.every((i) => i.deprecated || i.archived)) - return { ...category, collapsed: true }; + if (category.items.every((i) => i.deprecated || i.archived)) category.collapsed = true; return category; }) .sort();