Skip to content

Commit

Permalink
record-set.ts を更新
Browse files Browse the repository at this point in the history
Co-authored-by: Aayush thapa <84202325+aaythapa@users.noreply.github.com>
  • Loading branch information
badmintoncryer and aaythapa committed Jan 23, 2024
1 parent f4410ce commit 6a7b044
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/aws-cdk-lib/aws-route53/lib/record-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,7 @@ export class RecordSet extends Resource implements IRecordSet {
throw new Error('setIdentifier can only be specified for non-simple routing policies');
}

let nonSimpleRoutingPolicies = 0;
if (props.geoLocation) nonSimpleRoutingPolicies++;
if (props.region) nonSimpleRoutingPolicies++;
if (props.weight) nonSimpleRoutingPolicies++;
let nonSimpleRoutingPolicies = [props.geoLocation, props.region, props.weight].filter((variable) => variable !== undefined).length;
if (nonSimpleRoutingPolicies > 1) {
throw new Error('Only one of region, weight, or geoLocation can be defined');
}
Expand Down

0 comments on commit 6a7b044

Please sign in to comment.