Skip to content

Commit

Permalink
Merge pull request #1160 from gautamdsheth/bugfix/language-sort-issue
Browse files Browse the repository at this point in the history
Fix: sorting the terms in locale language
  • Loading branch information
AJIXuMuK authored Apr 19, 2022
2 parents 6f3b41a + 507f23a commit 9667638
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/SPTermStorePickerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,10 @@ export default class SPTermStorePickerService {
*/
private sortTermByPath(a: ITerm, b: ITerm) {
if (a.CustomSortOrderIndex === -1) {
if (a.PathOfTerm.toLowerCase() < b.PathOfTerm.toLowerCase()) {
if (a.Name.toLowerCase() < b.Name.toLowerCase()) {
return -1;
}
if (a.PathOfTerm.toLowerCase() > b.PathOfTerm.toLowerCase()) {
if (a.Name.toLowerCase() > b.Name.toLowerCase()) {
return 1;
}
return 0;
Expand Down

0 comments on commit 9667638

Please sign in to comment.