File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
packages/@aws-cdk/aws-lambda-event-sources/lib Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,9 @@ import * as lambda from '@aws-cdk/aws-lambda';
55import * as msk from '@aws-cdk/aws-msk' ;
66import * as secretsmanager from '@aws-cdk/aws-secretsmanager' ;
77import { Stack } from '@aws-cdk/core' ;
8+ import { Construct } from 'constructs' ;
89import { 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 ( {
You can’t perform that action at this time.
0 commit comments