Skip to content

Commit 635d1a4

Browse files
committed
another import fix
1 parent ff02cfa commit 635d1a4

File tree

1 file changed

+2
-5
lines changed
  • packages/@aws-cdk/aws-lambda-event-sources/lib

1 file changed

+2
-5
lines changed

packages/@aws-cdk/aws-lambda-event-sources/lib/kafka.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@ import * as lambda from '@aws-cdk/aws-lambda';
55
import * as msk from '@aws-cdk/aws-msk';
66
import * as secretsmanager from '@aws-cdk/aws-secretsmanager';
77
import { Stack } from '@aws-cdk/core';
8+
import { Construct } from 'constructs';
89
import { StreamEventSource, StreamEventSourceProps } from './stream';
910

10-
// keep this import separate from other imports to reduce chance for merge conflicts with v2-main
11-
// eslint-disable-next-line no-duplicate-imports, import/order
12-
import { Construct } from '@aws-cdk/core';
13-
1411
/**
1512
* Properties for a Kafka event source
1613
*/
@@ -147,7 +144,7 @@ export class SelfManagedKafkaEventSource extends StreamEventSource {
147144
}
148145

149146
public bind(target: lambda.IFunction) {
150-
if (!Construct.isConstruct(target)) { throw new Error('Function is not a construct. Unexpected error.'); }
147+
if (!(target instanceof Construct)) { throw new Error('Function is not a construct. Unexpected error.'); }
151148
target.addEventSourceMapping(
152149
this.mappingId(target),
153150
this.enrichMappingOptions({

0 commit comments

Comments
 (0)