Skip to content

Commit

Permalink
fix sort param parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
david-plugge committed Jan 31, 2024
1 parent e22e425 commit 8e5566a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ export class TypedRecordService

if (fields) options.fields = fields;
if (expand) options.expand = expand;
if (sort) {
options.sort = Array.isArray(options?.sort)
? options.sort.join(',')
: options?.sort;
if (Array.isArray(sort) && sort.length) {
options.sort = sort.join(',');
} else if (sort) {
options.sort = sort;
}

return options;
Expand Down

0 comments on commit 8e5566a

Please sign in to comment.