Skip to content

Commit

Permalink
fix(pv-stylemark): alphabetically sort categories by default
Browse files Browse the repository at this point in the history
  • Loading branch information
friewerts committed Mar 4, 2024
1 parent 3bfe82a commit 11bf7ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pv-stylemark/tasks/lsg/getLsgData.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const getDataSortedByCategory = (lsgData, config) => {
const orderedCategoryList = categoryList.sort((a, b) => {
const aIndex = orderConfig.indexOf(a.categoryName);
const bIndex = orderConfig.indexOf(b.categoryName);
if (aIndex === -1 && bIndex === -1) return 0;
if (aIndex === -1 && bIndex === -1) return a.categoryName.localeCompare(b.categoryName);
if (aIndex === -1) return 1;
if (bIndex === -1) return -1;
return aIndex - bIndex;
Expand Down

0 comments on commit 11bf7ee

Please sign in to comment.