File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -585,18 +585,15 @@ export class ServerlessSpy extends Construct {
585585 ( table . node . defaultChild as dynamoDb . CfnTable ) . streamSpecification = {
586586 streamViewType : dynamoDb . StreamViewType . NEW_AND_OLD_IMAGES ,
587587 } ;
588- var tableStreamArnDescriptor = Object . getOwnPropertyDescriptor (
589- table ,
590- 'tableStreamArn'
591- ) ;
592-
593- if (
594- tableStreamArnDescriptor === undefined ||
595- tableStreamArnDescriptor . get === undefined
596- ) {
597- ( table as any ) [ 'tableStreamArn' ] = (
588+ try {
589+ ( table as any ) . tableStreamArn = (
598590 table . node . defaultChild as dynamoDb . CfnTable
599591 ) . attrStreamArn ;
592+ } catch ( e ) {
593+ // Property is read-only in newer CDK versions, skip the assignment
594+ if ( ! ( e instanceof TypeError && e . message . includes ( 'only a getter' ) ) ) {
595+ throw e ; // Re-throw if it's a different error
596+ }
600597 }
601598
602599 this . lambdaSubscriptionMain . function . addEventSource (
You can’t perform that action at this time.
0 commit comments