Skip to content

Commit 5e5cef0

Browse files
committed
Fixed issue targeting legacy scenes that have no name crashing the application
1 parent fabc2b9 commit 5e5cef0

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) {
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)