Skip to content

Commit

Permalink
Check specifically for undefined and determining of the defaultRootOb…
Browse files Browse the repository at this point in the history
…ject prop is set or not.
  • Loading branch information
Blake Price committed Sep 27, 2018
1 parent 9d00e36 commit dcd446e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ export class CloudFrontWebDistribution extends cdk.Construct {
const distributionConfig: cloudformation.DistributionResource.DistributionConfigProperty = {
comment: props.comment,
enabled: true,
defaultRootObject: props.defaultRootObject || "index.html",
defaultRootObject: props.defaultRootObject !== undefined ? props.defaultRootObject : "index.html",
httpVersion: props.httpVersion || HttpVersion.HTTP2,
priceClass: props.priceClass || PriceClass.PriceClass100,
ipv6Enabled: props.enableIpV6 || true,
Expand Down

0 comments on commit dcd446e

Please sign in to comment.