From b653a20d1562c389a3e5bac99306a104ce4d6c1c Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 25 Aug 2024 16:53:14 -0500 Subject: [PATCH] fix(web): sort folders (#12038) chore(web): sort folders --- web/src/lib/utils/tree-utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/src/lib/utils/tree-utils.ts b/web/src/lib/utils/tree-utils.ts index cc17784eb6..13fb6c1605 100644 --- a/web/src/lib/utils/tree-utils.ts +++ b/web/src/lib/utils/tree-utils.ts @@ -6,6 +6,9 @@ export const normalizeTreePath = (path: string) => path.replace(/^\//, '').repla export function buildTree(paths: string[]) { const root: RecursiveObject = {}; + + paths.sort(); + for (const path of paths) { const parts = path.split('/'); let current = root;