From ff84c97c8da3fa85a78b0daccd62f7fce07bfa67 Mon Sep 17 00:00:00 2001 From: Drazen Date: Wed, 28 Feb 2024 12:51:23 +0000 Subject: [PATCH] Sort flows for view --- src/flow_view.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/flow_view.ts b/src/flow_view.ts index 474261a..11a7584 100644 --- a/src/flow_view.ts +++ b/src/flow_view.ts @@ -31,14 +31,13 @@ export class FlowView extends ItemView { (file) => file.path.startsWith("CloudAtlas/") && file.path.endsWith(".flow.md") - ); + ).map((f) => f.path.split("/")[1].split(".flow.md")[0]).sort(); console.debug(`Found ${cloudAtlasFlows.length} CloudAtlas flows`); const ul = container.createEl("ul"); // Create commands for each flow - cloudAtlasFlows.sort().forEach((flowFile) => { - const flow = flowFile.path.split("/")[1].split(".flow.md")[0]; + cloudAtlasFlows.forEach((flow) => { const table = ul.createEl("table"); table.addClass("cloud-atlas-flow-table"); const tr = table.createEl("tr");