Skip to content

Commit

Permalink
Removed duplicate import
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenKirschbaum committed Aug 2, 2021
1 parent 41238ea commit a1ccdcc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/@aws-cdk/aws-s3-deployment/lib/bucket-deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as iam from '@aws-cdk/aws-iam';
import * as lambda from '@aws-cdk/aws-lambda';
import * as s3 from '@aws-cdk/aws-s3';
import * as cdk from '@aws-cdk/core';
import { Token } from '@aws-cdk/core';
import { AwsCliLayer } from '@aws-cdk/lambda-layer-awscli';
import { kebab as toKebabCase } from 'case';
import { Construct } from 'constructs';
Expand Down Expand Up @@ -201,8 +200,8 @@ export class BucketDeployment extends CoreConstruct {
if (!props.distribution) {
throw new Error('Distribution must be specified if distribution paths are specified');
}
if (!Token.isUnresolved(props.distributionPaths)) {
if (!props.distributionPaths.every(distributionPath => Token.isUnresolved(distributionPath) || distributionPath.startsWith('/'))) {
if (!cdk.Token.isUnresolved(props.distributionPaths)) {
if (!props.distributionPaths.every(distributionPath => cdk.Token.isUnresolved(distributionPath) || distributionPath.startsWith('/'))) {
throw new Error('Distribution paths must start with "/"');
}
}
Expand Down

0 comments on commit a1ccdcc

Please sign in to comment.