From f13749124a23a0317dfa3037dd0e063edeceb889 Mon Sep 17 00:00:00 2001 From: James Elson Date: Wed, 26 Jun 2024 16:31:14 -0700 Subject: [PATCH] Fixed TypeError: Cannot read properties of undefined (reading 'localeCompare') --- src/nextapp/pages/manager/gateways/list.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nextapp/pages/manager/gateways/list.tsx b/src/nextapp/pages/manager/gateways/list.tsx index ea5387bf9..a9de38250 100644 --- a/src/nextapp/pages/manager/gateways/list.tsx +++ b/src/nextapp/pages/manager/gateways/list.tsx @@ -258,8 +258,8 @@ const MyGatewaysPage: React.FC = () => { {namespaceSearchResults .sort( (a, b) => - a.displayName.localeCompare(b.displayName) || - a.name.localeCompare(b.name) + a.displayName?.localeCompare(b.displayName) || + a.name?.localeCompare(b.name) ) .map((namespace) => (