Support previous API interface as well

This commit is contained in:
Paul Kronenwetter
2026-01-23 21:53:30 -05:00
parent c61a9119a7
commit 5777a5f509
5 changed files with 25 additions and 8 deletions
+16 -5
View File
@@ -54,9 +54,20 @@ export function mapNodes(
}
export function sortNodeTags(nodes: Machine[]): string[] {
return Array.from(
new Set(
nodes.flatMap((node) => node.tags),
),
).sort();
try {
return Array.from(
new Set(
nodes.flatMap((node) => node.tags),
),
).sort();
} catch {
return Array.from(
new Set(
nodes.flatMap(({ validTags, forcedTags }) => [
...validTags,
...forcedTags,
]),
),
).sort();
}
}