Skip to content

Commit

Permalink
fix: length comparision for key with alias
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Oct 20, 2022
1 parent 19f4fa5 commit 0ebf707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parameter/sort/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export function parseQuerySort<T extends ObjectLiteral = ObjectLiteral>(
let key : string;

const parts = keyWithAlias.split('.');
if (parts.length > 0) {
if (parts.length > 1) {
key = parts.pop();
} else {
key = keyWithAlias;
Expand Down

0 comments on commit 0ebf707

Please sign in to comment.