Skip to content

Commit 9730d7a

Browse files
author
Esen Sagynov
committed
Fix linter errors.
1 parent 0e75d9e commit 9730d7a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/cdk-cloudfront-authorization/src/distributions.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export class BaseDistribution extends Construct implements aws_cloudfront.IDistr
174174
const removalPolicy = props.removalPolicy ?? RemovalPolicy.DESTROY;
175175
const origin = props.origin ?? this.defaultOrigin(removalPolicy);
176176

177-
const distribution = this.distribution = new aws_cloudfront.Distribution(this, 'Distribution', {
177+
const distribution = new aws_cloudfront.Distribution(this, 'Distribution', {
178178
enabled: props.enabled ?? true,
179179
enableIpv6: props.enableIpv6 ?? true,
180180
comment: props.comment,
@@ -195,6 +195,8 @@ export class BaseDistribution extends Construct implements aws_cloudfront.IDistr
195195
defaultRootObject: props.defaultRootObject ?? 'index.html',
196196
});
197197

198+
this.distribution = distribution;
199+
198200
const callbackUrls = props.domainNames?.map((name) => `https://${name}${props.authorization.redirectPaths.signIn}`) ?? [];
199201
const logoutUrls = props.domainNames?.map((name) => `https://${name}${props.authorization.redirectPaths.signOut}`) ?? [];
200202

packages/cdk-contentful-webhook/src/contentful-webhook.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export class ContentfulWebhook extends Construct {
2727
timeout: Duration.minutes(15),
2828
});
2929

30-
if (accessToken.grantRead) {
31-
accessToken.grantRead(handler.role!);
30+
if (accessToken.grantRead && handler.role) {
31+
accessToken.grantRead(handler.role);
3232
}
3333

3434
new CustomResource(this, 'CustomResource', {

0 commit comments

Comments
 (0)