Skip to content

Commit

Permalink
disable specific enum values
Browse files Browse the repository at this point in the history
  • Loading branch information
Govorunb committed Jun 15, 2024
1 parent 1c7f6f3 commit f995262
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ebs/src/modules/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ function validateArgs(config: Config, cart: Cart, logContext: LogMessage): strin
if (parsed < 0 || parsed >= argEnum.length) {
return `Enum value ${value} (for enum ${arg.type}) out of range`;
}
if (argEnum[parsed].startsWith("[DISABLED]")) {
return `Enum value ${value} (for enum ${arg.type}) is disabled`;
}
break;
}
}
Expand Down

0 comments on commit f995262

Please sign in to comment.