Skip to content

Commit

Permalink
One page results have no lastKeyEvaluated property.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Marmor committed Jan 22, 2013
1 parent 91aa6b7 commit 816668b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/scan.js
Expand Up @@ -172,7 +172,7 @@ function ScanResult(model, alias, data){
this.isLastPage = data.LastEvaluatedKey === null;
this.lastEvaluatedKey = (this.isLastPage) ? null : {};

if(!this.isLastPage){
if((!this.isLastPage) && (data.lastKeyEvaluated !== undefined)){
hashField = this.schema.field(this.schema.hash);
this.lastEvaluatedKey[hashField.name] = hashField.import(
data.LastKeyEvaluated.HashKeyElement[hashField.shortType]
Expand Down

0 comments on commit 816668b

Please sign in to comment.