diff --git a/src/components/connection/connection-item.tsx b/src/components/connection/connection-item.tsx index d04bf210e162a5dee3ebe1384b153d075a67d3a5..d6c78eb01f01b9204877409f98e8f5f7e38584c1 100644 --- a/src/components/connection/connection-item.tsx +++ b/src/components/connection/connection-item.tsx @@ -58,7 +58,7 @@ export const ConnectionItem = (props: Props) => { {!!metadata.process && <Tag>{metadata.process}</Tag>} - {chains.length > 0 && <Tag>{chains[value.chains.length - 1]}</Tag>} + {chains?.length > 0 && <Tag>{chains[value.chains.length - 1]}</Tag>} <Tag>{dayjs(start).fromNow()}</Tag> diff --git a/src/pages/connections.tsx b/src/pages/connections.tsx index 1b5f2e723df115d29a73f24c6abe529f791423cc..7c53f678716eaa5e200fdee85a4ba3b50d2c208d 100644 --- a/src/pages/connections.tsx +++ b/src/pages/connections.tsx @@ -69,7 +69,7 @@ const ConnectionsPage = () => { const connections: typeof oldConn = []; - const rest = data.connections?.filter((each) => { + const rest = (data.connections || []).filter((each) => { const index = oldConn.findIndex((o) => o.id === each.id); if (index >= 0 && index < maxLen) {