diff --git a/typescript/static-site/index.ts b/typescript/static-site/index.ts index 17418ea9c..ee8cc1e19 100644 --- a/typescript/static-site/index.ts +++ b/typescript/static-site/index.ts @@ -18,8 +18,8 @@ class MyStaticSiteStack extends cdk.Stack { super(parent, name, props); new StaticSite(this, 'StaticSite', { - domainName: this.node.getContext('domain'), - siteSubDomain: this.node.getContext('subdomain'), + domainName: this.node.tryGetContext('domain'), + siteSubDomain: this.node.tryGetContext('subdomain'), }); } }