diff --git a/package.json b/package.json index 40de73d..8e6d971 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/query.ts b/src/query.ts index 2947d5b..1c4dd5d 100644 --- a/src/query.ts +++ b/src/query.ts @@ -29,7 +29,7 @@ export async function handleQueryCommand( 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