docs-util: remove duplicate union children (#10942)

This commit is contained in:
Shahed Nasser
2025-01-13 19:48:51 +02:00
committed by GitHub
parent d9ea65dfc4
commit 1b86c17b72

View File

@@ -36,14 +36,13 @@ export function getTypeChildren({
break
case "union":
reflectionType.types.forEach((childItem) => {
// TODO this should ensure that the items are unique.
children.push(
...getTypeChildren({
reflectionType: childItem,
project,
level: level + 1,
maxLevel,
})
}).filter((child) => !children.some((c) => c.name === child.name))
)
})
break