Skip to content

Commit

Permalink
fix: Fix hosted zone lookup (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
khuezy authored Nov 10, 2022
1 parent e9cddef commit 469ccca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Nextjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -690,12 +690,12 @@ export class Nextjs extends Construct {
hostedZone = route53.HostedZone.fromLookup(this, 'HostedZone', {
domainName: customDomain,
});
} else if (customDomain.hostedZone) {
hostedZone = customDomain.hostedZone;
} else if (typeof customDomain.hostedZone === 'string') {
hostedZone = route53.HostedZone.fromLookup(this, 'HostedZone', {
domainName: customDomain.hostedZone,
});
} else if (customDomain.hostedZone) {
hostedZone = customDomain.hostedZone;
} else if (typeof customDomain.domainName === 'string') {
// Skip if domain is not a Route53 domain
if (customDomain.isExternalDomain === true) {
Expand Down

0 comments on commit 469ccca

Please sign in to comment.