Skip to content

Commit

Permalink
fix(list): fix error when factory is null
Browse files Browse the repository at this point in the history
  • Loading branch information
neikvon committed Oct 13, 2020
1 parent f906f80 commit a49c830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class CommandList extends Command {

this.padWidth =
Math.max(
...flatten(factories.map((item: Factory) => item.commands || null))
...flatten(factories.map((item: Factory) => item?.commands || null))
.filter(Boolean)
.map(
(command: Command) =>
Expand Down

0 comments on commit a49c830

Please sign in to comment.