fix: 更新数据面板的驱动方式
This commit is contained in:
@@ -15,7 +15,7 @@ export function connectSituationWebSocket(onData: Handler): () => void {
|
||||
ws.onmessage = (e) => {
|
||||
try {
|
||||
const msg = JSON.parse(e.data)
|
||||
if (msg.type === 'situation' && msg.data) handler?.(msg.data)
|
||||
if (msg.type === 'situation') handler?.({ situation: msg.data, stats: msg.stats })
|
||||
} catch (_) {}
|
||||
}
|
||||
ws.onclose = () => {
|
||||
|
||||
Reference in New Issue
Block a user