fix: page null exception, close #821

This commit is contained in:
GyDi 2023-10-30 00:53:24 +08:00
parent 510a0c5e70
commit fb08af96bd
No known key found for this signature in database
GPG Key ID: 9C3AD40F1F99880A
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) {