Skip to content

Commit

Permalink
🔀 Merge pull request gchq#354 from Lissy93/FEATURE/ignore-case-alphab…
Browse files Browse the repository at this point in the history
…etical-sort

[FEATURE] Case-insensitive item sorting
Fixes gchq#352
  • Loading branch information
Lissy93 committed Dec 6, 2021
2 parents 4d9e36c + 2e57ea9 commit fddf650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/LinkItems/Section.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default {
},
/* Sorts items alphabetically using the title attribute */
sortAlphabetically(items) {
return items.sort((a, b) => (a.title > b.title ? 1 : -1));
return items.sort((a, b) => (a.title.toLowerCase() > b.title.toLowerCase() ? 1 : -1));
},
/* Sorts items by most used to least used, based on click-count */
sortByMostUsed(items) {
Expand Down

0 comments on commit fddf650

Please sign in to comment.