Skip to content

Commit 740125e

Browse files
committed
fixing scan when there is multiple page
1 parent 52ff3a4 commit 740125e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const scan = client => table => async (options = {}, previous = []) => {
1717
const items = [...previous, ...response.Items]
1818
const lastKey = response.LastEvaluatedKey
1919
if (!lastKey) return items
20-
return scan({ ...options, ExclusiveStartKey: lastKey }, items)
20+
return scan(client)(table)({ ...options, ExclusiveStartKey: lastKey }, items)
2121
}
2222

2323
export const put = client => table => async (item, options = {}) => {

0 commit comments

Comments
 (0)