Skip to content

Commit

Permalink
fix to sort browse-by facets that have leading spaces #238
Browse files Browse the repository at this point in the history
  • Loading branch information
UcDust committed Nov 13, 2024
1 parent 2739bea commit f500219
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ export default class AppBrowseBy extends Mixin(LitElement)
return 0;
} else {
return sort.dir === 'asc'
? a[sort.type].toLowerCase().localeCompare(b[sort.type].toLowerCase())
: b[sort.type].toLowerCase().localeCompare(a[sort.type].toLowerCase());
? a[sort.type].trim().toLowerCase().localeCompare(b[sort.type].trim().toLowerCase())
: b[sort.type].trim().toLowerCase().localeCompare(a[sort.type].trim().toLowerCase());
}
});
this.sortedAs = sort.type;
Expand Down

0 comments on commit f500219

Please sign in to comment.