From ad28fb4eb1828fd011ec75fd16f8605f96dedf39 Mon Sep 17 00:00:00 2001 From: mazyu36 Date: Mon, 29 Jul 2024 23:45:34 +0900 Subject: [PATCH] update validation Co-authored-by: Luca Pizzini --- packages/@aws-cdk/aws-location-alpha/lib/geofence-collection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-location-alpha/lib/geofence-collection.ts b/packages/@aws-cdk/aws-location-alpha/lib/geofence-collection.ts index 10931a6389485..ffad8c207dd0d 100644 --- a/packages/@aws-cdk/aws-location-alpha/lib/geofence-collection.ts +++ b/packages/@aws-cdk/aws-location-alpha/lib/geofence-collection.ts @@ -139,7 +139,7 @@ export class GeofenceCollection extends GeofenceCollectionBase { constructor(scope: Construct, id: string, props: GeofenceCollectionProps = {}) { - 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`); }