fix for apps with undefined names

This commit is contained in:
Martin McKeaveney 2021-09-13 16:33:26 +01:00
parent a4578aaa07
commit c958d444f6
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@
if (sortBy === "status") { if (sortBy === "status") {
return enrichedApps.sort((a, b) => { return enrichedApps.sort((a, b) => {
if (a.status === b.status) { if (a.status === b.status) {
return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1 return a.name?.toLowerCase() < b.name?.toLowerCase() ? -1 : 1
} }
return a.status === AppStatus.DEPLOYED ? -1 : 1 return a.status === AppStatus.DEPLOYED ? -1 : 1
}) })
@ -61,7 +61,7 @@
}) })
} else { } else {
return enrichedApps.sort((a, b) => { return enrichedApps.sort((a, b) => {
return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1 return a.name?.toLowerCase() < b.name?.toLowerCase() ? -1 : 1
}) })
} }
} }