Skip to content

Commit

Permalink
fix(updateRequest): change sort key check
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwittwer committed Oct 9, 2017
1 parent b63cd39 commit d2d992f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dynamo/request/update/update.request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class UpdateRequest<T> extends BaseRequest<T, any> {

const hasSortKey: boolean = this.metaData.getSortKey() !== null

if ((hasSortKey && sortKey === null) || sortKey === undefined) {
if (hasSortKey && (sortKey === null || sortKey === undefined)) {
throw new Error(`please provide the sort key for attribute ${this.metaData.getSortKey()}`)
}

Expand Down

0 comments on commit d2d992f

Please sign in to comment.