From c958d444f62c4e306753dc2cbebb88357cad38fa Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 13 Sep 2021 16:33:26 +0100 Subject: [PATCH] fix for apps with undefined names --- packages/builder/src/pages/builder/portal/apps/index.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index 50b49de9da..f1ebe1a72a 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -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 }) } }