diff --git a/client/src/components/Endpoints/Icon.tsx b/client/src/components/Endpoints/Icon.tsx index 8065228736..f2627a97ba 100644 --- a/client/src/components/Endpoints/Icon.tsx +++ b/client/src/components/Endpoints/Icon.tsx @@ -77,7 +77,8 @@ const Icon: React.FC = (props) => { default: { icon: , bg: 'grey', name: 'UNKNOWN' }, }; - const { icon, bg, name } = endpointIcons[endpoint ?? 'default']; + const { icon, bg, name } = + endpoint && endpointIcons[endpoint] ? endpointIcons[endpoint] : endpointIcons.default; return (
= (props) => { default: { icon: , name: 'UNKNOWN' }, }; - const { icon, name } = endpointIcons[endpoint]; + const { icon, name } = endpointIcons[endpoint] ?? endpointIcons.default; return (