Skip to content

Commit

Permalink
🩹 fix(patch): fix bud menu selection (#2433)
Browse files Browse the repository at this point in the history
Only show the first example usage for each command in the main bud.js selection menu.

## Type of change

**PATCH: backwards compatible change**
  • Loading branch information
kellymears committed Sep 5, 2023
1 parent 361f66b commit 8ae6d6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sources/@roots/bud/src/cli/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export const Menu = ({cli}: {cli: BudCommand[`cli`]}) => {
.reduce((acc, cmd, id) => {
return [
...acc,
...(cmd.examples ?? []).map(([description, path]) => {
cmd.examples?.map(([description, path]) => {
return {cmd, description, id, path}
}),
]
}).shift(),
].filter(Boolean)
}, []),
)
}, [defined])
Expand Down

0 comments on commit 8ae6d6f

Please sign in to comment.