mirror of
https://github.com/ruvnet/RuView
synced 2026-07-24 17:43:20 +00:00
fix: add defensive optional chaining for node.chip access
Rust DiscoveredNode stub doesn't include chip field yet. Use optional chaining (node.chip?.toUpperCase()) to prevent TypeError at runtime. Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
+1
-1
@@ -96,7 +96,7 @@ export function NodeCard({ node, onClick }: NodeCardProps) {
|
||||
>
|
||||
<DetailRow label="MAC" value={node.mac ?? "--"} mono />
|
||||
<DetailRow label="Firmware" value={node.firmware_version ?? "--"} mono />
|
||||
<DetailRow label="Chip" value={node.chip.toUpperCase()} />
|
||||
<DetailRow label="Chip" value={node.chip?.toUpperCase() ?? "--"} />
|
||||
<DetailRow label="Role" value={node.mesh_role} />
|
||||
<DetailRow
|
||||
label="TDM"
|
||||
|
||||
@@ -192,7 +192,7 @@ function NodeRow({
|
||||
<Td mono>{node.mac ?? "--"}</Td>
|
||||
<Td mono>{node.ip}</Td>
|
||||
<Td mono>{node.firmware_version ?? "--"}</Td>
|
||||
<Td>{node.chip.toUpperCase()}</Td>
|
||||
<Td>{node.chip?.toUpperCase() ?? "--"}</Td>
|
||||
<Td>{formatLastSeen(node.last_seen)}</Td>
|
||||
</tr>
|
||||
{isExpanded && (
|
||||
|
||||
Reference in New Issue
Block a user