Skip to content

Commit

Permalink
docs-util: remove duplicate union children (medusajs#10942)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahednasser authored Jan 13, 2025
1 parent d9ea65d commit 1b86c17
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions www/utils/packages/utils/src/get-type-children.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1b86c17

Please sign in to comment.