diff --git a/src/base-model.ts b/src/base-model.ts index 808f8e6..5eb4e5c 100644 --- a/src/base-model.ts +++ b/src/base-model.ts @@ -704,10 +704,10 @@ export default abstract class Model { //Make one BatchWrite request for every batch of 25 operations let params: BatchWriteCommandInput; const output: BatchWriteCommandOutput[] = await Promise.all( - batches.map(batch => { + batches.map(async (batch) => { params = { RequestItems: { - [this.tableName as string]: batch + [await this.tableName as string]: batch } } if (options) {