Skip to content

Commit

Permalink
update validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mazyu36 committed Jul 29, 2024
1 parent 3841404 commit cd26ab7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class RouteCalculator extends RouteCalculatorBase {

constructor(scope: Construct, id: string, props: RouteCalculatorProps = {}) {

if (props.description !== undefined && !Token.isUnresolved(props.description) && props.description.length > 1000) {
if (props.description && !Token.isUnresolved(props.description) && props.description.length > 1000) {
throw new Error(`\`description\` must be between 0 and 1000 characters. Received: ${props.description.length} characters`);
}

Expand Down

0 comments on commit cd26ab7

Please sign in to comment.