From f616a2eecee49f908a7628dd1e66ebb819451d66 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Thu, 30 Apr 2020 09:55:40 +0300 Subject: [PATCH] fix #6891 --- packages/@aws-cdk/aws-eks/lib/cluster.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index 35fd2ed2a8b02..c264cf6f5dab2 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -959,9 +959,9 @@ export class EksOptimizedImage implements ec2.IMachineImage { /** * Constructs a new instance of the EcsOptimizedAmi class. */ - public constructor(props: EksOptimizedImageProps) { - this.nodeType = props && props.nodeType; - this.kubernetesVersion = props && props.kubernetesVersion || LATEST_KUBERNETES_VERSION; + public constructor(props: EksOptimizedImageProps = { }) { + this.nodeType = props.nodeType ?? NodeType.STANDARD; + this.kubernetesVersion = props.kubernetesVersion ?? LATEST_KUBERNETES_VERSION; // set the SSM parameter name this.amiParameterName = `/aws/service/eks/optimized-ami/${this.kubernetesVersion}/`