Skip to content

Commit

Permalink
fix result item lost in batchCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
frankleng committed Oct 20, 2023
1 parent 4846ee9 commit 04dd78b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dynadash",
"version": "1.9.15",
"version": "1.9.16",
"description": "DynamoDb helpers",
"main": "dist/index.js",
"types": "dist/types/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function handleQueryCommand<R>(
result = await client.send(new QueryCommand(query));

if (batchCallback) {
await batchCallback(result.Items as R[]);
await batchCallback([...(result.Items || [])] as R[]);
result.Items = undefined;
} else {
// Concatenating the retrieved items
Expand Down

0 comments on commit 04dd78b

Please sign in to comment.