Skip to content

Commit

Permalink
fix: handle undefined flags in help
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Nov 7, 2023
1 parent 538275b commit bd5a38f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/help/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export class Help extends HelpBase {
if (command) {
if (command.hasDynamicHelp && command.pluginType !== 'jit') {
const loaded = await command.load()
for (const [name, flag] of Object.entries(loaded.flags)) {
for (const [name, flag] of Object.entries(loaded.flags ?? {})) {
// As of v3 each flag that needs to be re-evaluated has the `hasDynamicHelp` property.
// However, we cannot assume that the absence of this property means that the flag
// doesn't need to be re-evaluated since any command from a v2 or older plugin will
Expand Down

0 comments on commit bd5a38f

Please sign in to comment.