From 095fa72e69d20a4c1cb1a367f3672f0522c6b31f Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Sat, 28 Sep 2024 13:08:38 -0700 Subject: [PATCH] sorting looks correct --- scripts/src/sidebar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/src/sidebar.ts b/scripts/src/sidebar.ts index 3661346..99ad353 100644 --- a/scripts/src/sidebar.ts +++ b/scripts/src/sidebar.ts @@ -27,7 +27,7 @@ function buildSidebar(aeps: AEP[], groups: any, sidebar: Sidebar): Sidebar { for (var group of groups.categories) { response.push({ 'label': group.title, - 'items': aeps.filter((aep) => aep.category == group.code).sort((a1, a2) => a1.order > a2.order ? 1 : -1).map((aep) => ({label: `${aep.id}. ${aep.title}`, link: aep.slug})) + 'items': aeps.filter((aep) => aep.category == group.code).sort((a1, a2) => a1.id > a2.id ? 1 : -1).map((aep) => ({label: `${aep.id}. ${aep.title}`, link: aep.slug})) }) }