Skip to content

Commit

Permalink
Fix location type enum sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Mar 9, 2023
1 parent ec063f0 commit 99d0e7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export class SourcingLocationsService extends AppBaseService<
.sort((a: { locationType: string }, b: { locationType: string }) => {
const comparison: number =
a.locationType.toLowerCase() < b.locationType.toLowerCase() ? -1 : 1;
return options.sort === 'DESC' ? comparison * -1 : comparison;
return options.sort === 'DESC' ? comparison : comparison * -1;
});

return { data: locationTypeParser(locationTypes) };
Expand Down

0 comments on commit 99d0e7f

Please sign in to comment.