diff --git a/www/utils/packages/utils/src/get-type-children.ts b/www/utils/packages/utils/src/get-type-children.ts index 7313adb82a..c91927ec46 100644 --- a/www/utils/packages/utils/src/get-type-children.ts +++ b/www/utils/packages/utils/src/get-type-children.ts @@ -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