Skip to content

Commit eda1c63

Browse files
committed
Merge branch 'master' into key-members-validation
2 parents 46a42b0 + e334f72 commit eda1c63

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/dynamo/request/batchwritesingletable/batch-write-single-table.request.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ export class BatchWriteSingleTableRequest<T> {
5959

6060
return this.dynamoRx.batchWriteItem(batchWriteItemInput).pipe(
6161
tap((batchWriteManyResponse: BatchWriteItemOutput) => {
62-
if (batchWriteManyResponse.UnprocessedItems) {
62+
if (batchWriteManyResponse.UnprocessedItems && batchWriteManyResponse.UnprocessedItems[this.tableName]) {
6363
this.itemsToProcess.unshift(...batchWriteManyResponse.UnprocessedItems[this.tableName])
6464
}
6565
}),
6666
map((batchWriteManyResponse: BatchWriteItemOutput) => ({
6767
remainingItems: this.itemsToProcess.length,
68-
capacityExceeded: !!batchWriteManyResponse.UnprocessedItems,
68+
capacityExceeded: !!(
69+
batchWriteManyResponse.UnprocessedItems && batchWriteManyResponse.UnprocessedItems[this.tableName]
70+
),
6971
consumedCapacity: batchWriteManyResponse.ConsumedCapacity,
7072
}))
7173
)

0 commit comments

Comments
 (0)