Skip to content

Commit c712ff8

Browse files
authored
Merge pull request #564 from kdvalin/hotfix/project-sorting
Project Sorting Hotfix
2 parents fabc2b9 + 11c0288 commit c712ff8

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/components/structural/header/ProjectView.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -373,13 +373,15 @@ class Project extends React.Component {
373373
* @returns 1 if project a should come before project b, -1 if b should come before a
374374
*/
375375
projectSort = (a,b)=>{
376-
if(a.name.toUpperCase() < b.name.toUpperCase())
377-
{
378-
return -1;
379-
}
380-
else if(a.name.toUpperCase() > b.name.toUpperCase())
381-
{
382-
return 1;
376+
if(a.name && b.name) {
377+
if(a.name.toUpperCase() < b.name.toUpperCase())
378+
{
379+
return -1;
380+
}
381+
else if(a.name.toUpperCase() > b.name.toUpperCase())
382+
{
383+
return 1;
384+
}
383385
}
384386
else if(a.updateTime > b.updateTime)
385387
{

0 commit comments

Comments
 (0)