File tree 1 file changed +7
-5
lines changed
packages/idempotency/src/persistence
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -81,15 +81,17 @@ class DynamoDBPersistenceLayer extends BasePersistenceLayer {
81
81
this . staticPkValue =
82
82
config . staticPkValue ?? `idempotency#${ this . idempotencyKeyPrefix } ` ;
83
83
84
- this . client = new DynamoDBClient ( config ?. clientConfig ?? { } ) ;
85
- if ( config ?. awsSdkV3Client ) {
86
- if ( isSdkClient ( config . awsSdkV3Client ) ) {
87
- this . client = config . awsSdkV3Client ;
88
- } else {
84
+ if ( config . awsSdkV3Client ) {
85
+ if ( ! isSdkClient ( config . awsSdkV3Client ) ) {
89
86
console . warn (
90
87
'awsSdkV3Client is not an AWS SDK v3 client, using default client'
91
88
) ;
89
+ this . client = new DynamoDBClient ( config . clientConfig ?? { } ) ;
90
+ } else {
91
+ this . client = config . awsSdkV3Client ;
92
92
}
93
+ } else {
94
+ this . client = new DynamoDBClient ( config . clientConfig ?? { } ) ;
93
95
}
94
96
addUserAgentMiddleware ( this . client , 'idempotency' ) ;
95
97
}
You can’t perform that action at this time.
0 commit comments