mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-26 07:24:10 +08:00
fix(overview): error when reading length (#188)
* fix(overview): error when reading length * fix(connections): update WsMsg type definition --------- Signed-off-by: nb5p <2098464+nb5p@users.noreply.github.com> Co-authored-by: nb5p <nb5p@users.noreply.github.com>
This commit is contained in:
parent
4e4f2f85c0
commit
9f227c9c2c
@ -103,7 +103,7 @@ export default () => {
|
||||
</TrafficWidget>
|
||||
|
||||
<TrafficWidget label={t('activeConnections')}>
|
||||
{latestConnectionMsg()?.connections.length || 0}
|
||||
{latestConnectionMsg()?.connections?.length || 0}
|
||||
</TrafficWidget>
|
||||
|
||||
<TrafficWidget label={t('memoryUsage')}>
|
||||
|
@ -4,7 +4,7 @@ import { CONNECTIONS_TABLE_MAX_CLOSED_ROWS } from '~/constants'
|
||||
import { Connection, ConnectionRawMessage } from '~/types'
|
||||
|
||||
export type WsMsg = {
|
||||
connections: ConnectionRawMessage[]
|
||||
connections: ConnectionRawMessage[] | null
|
||||
uploadTotal: number
|
||||
downloadTotal: number
|
||||
} | null
|
||||
|
Loading…
x
Reference in New Issue
Block a user