Skip to content

Commit

Permalink
Merge pull request #564 from kdvalin/hotfix/project-sorting
Browse files Browse the repository at this point in the history
Project Sorting Hotfix
  • Loading branch information
kdvalin authored Apr 25, 2022
2 parents fabc2b9 + 11c0288 commit c712ff8
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/components/structural/header/ProjectView.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,15 @@ class Project extends React.Component {
* @returns 1 if project a should come before project b, -1 if b should come before a
*/
projectSort = (a,b)=>{
if(a.name.toUpperCase() < b.name.toUpperCase())
{
return -1;
}
else if(a.name.toUpperCase() > b.name.toUpperCase())
{
return 1;
if(a.name && b.name) {
if(a.name.toUpperCase() < b.name.toUpperCase())
{
return -1;
}
else if(a.name.toUpperCase() > b.name.toUpperCase())
{
return 1;
}
}
else if(a.updateTime > b.updateTime)
{
Expand Down

0 comments on commit c712ff8

Please sign in to comment.