Skip to content

Commit

Permalink
fix: Assignment does not validate account number if target type is unset
Browse files Browse the repository at this point in the history
The default is that the target type is an account so we should run validation if the prop is undefined.
  • Loading branch information
bmiller08 committed Apr 13, 2024
1 parent d01e11d commit 44b80c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/assignment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class Assignment extends AssignmentBase {
constructor(scope: Construct, id: string, props: AssignmentProps) {
super (scope, id);

if (props.targetType === TargetTypes.AWS_ACCOUNT) {
if (props.targetType === TargetTypes.AWS_ACCOUNT || props.targetType === undefined) {
Assignment.validateAwsAccountTargetId(props.targetId);
}
validatePrincipal(props.principal);
Expand Down

0 comments on commit 44b80c1

Please sign in to comment.