fix for apps with undefined names

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

View File

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