🐞 fix: status display

When the node goes online, it is displayed as local
This commit is contained in:
m1m1sha 2024-09-12 12:45:27 +08:00
parent f46ba4f7c6
commit ab46205d9e

View File

@ -40,10 +40,9 @@ const peerRouteInfos = computed(() => {
}) })
function routeCost(info: any) { function routeCost(info: any) {
if (!info.peer)
return t('status.local')
if (info.route) { if (info.route) {
if (!info.peer && !info.route.peer_id)
return t('status.local')
const cost = info.route.cost const cost = info.route.cost
return cost === 1 ? 'p2p' : `relay(${cost})` return cost === 1 ? 'p2p' : `relay(${cost})`
} }