Skip to content

Commit d2d992f

Browse files
fix(updateRequest): change sort key check
1 parent b63cd39 commit d2d992f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dynamo/request/update/update.request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class UpdateRequest<T> extends BaseRequest<T, any> {
3535

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

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

0 commit comments

Comments
 (0)