fix: page null exception, close #821

This commit is contained in:
GyDi 2023-10-30 00:53:24 +08:00
parent fbf230cd01
commit 1950cf5f99
2 changed files with 2 additions and 2 deletions

View File

@ -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>

View File

@ -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) {