Skip to content

Commit d010563

Browse files
committed
Fixed a potential exception where the organizationalUnitsNode might be undefined and cause errors
1 parent 1162746 commit d010563

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ui/src/pages/wizards/components/vpc-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ const regionTitle = {title: "Region", desc: "Region for the VPC"}
317317
const cidrPoolTitle = {title: "CIDR Pool Name & Size", desc: "The name of the CIDR pool to assign IP addresses from and the size of the CIDR pool to assign to the VPC. Size must be between 16-28."}
318318

319319
const getDefinedIn = (vpcName: string) => {
320-
return vpcName in organizationalUnitsNode ? 'Organizational Unit' : 'Account';
320+
return organizationalUnitsNode && (vpcName in organizationalUnitsNode) ? 'Organizational Unit' : 'Account';
321321
}
322322

323323
return (

0 commit comments

Comments
 (0)