diff --git a/src/pages/connections.tsx b/src/pages/connections.tsx index 535d3c01d7ba00d0c8a965af0a1e915930a5e9cf..9e2bce53b22c60466217f0decd6b17fe4c1fd29e 100644 --- a/src/pages/connections.tsx +++ b/src/pages/connections.tsx @@ -56,15 +56,16 @@ const ConnectionsPage = () => { const { connect, disconnect } = useWebsocket( (event) => { + // meta v1.15.0 出现data.connections为null的情况 const data = JSON.parse(event.data) as IConnections; // å°½é‡ä¸Žå‰ä¸€æ¬¡connections的展示顺åºä¿æŒä¸€è‡´ setConnData((old) => { const oldConn = old.connections; - const maxLen = data.connections.length; + const maxLen = data.connections?.length; 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) {