Skip to content

Commit

Permalink
Applies the alpha sort to only branches
Browse files Browse the repository at this point in the history
  • Loading branch information
CGoodwin90 committed Mar 26, 2024
1 parent 08c5e45 commit b00ce1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const PageProject = ({ router }) => {
}
// Sort alphabetically by environmentType and then deployType
const environments = R.sortWith(
[R.descend(R.prop('environmentType')), R.ascend(R.prop('deployType')), R.ascend(R.prop('name'))],
[R.descend(R.prop('environmentType')), R.ascend(R.prop('deployType')), R.ascend(env => env.deployType === 'branch' ? env.name : null)],
project.environments
);
const environmentCount = environments.length;
Expand Down

0 comments on commit b00ce1e

Please sign in to comment.