Browse Source

Merge pull request #430 from PhotoNomad0/bugfix-fixMapCrashHwModel

bugfix for Map crash
pull/434/head
Dan Ditomaso 1 year ago
committed by GitHub
parent
commit
e769143e58
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      src/components/PageComponents/Map/NodeDetail.tsx

6
src/components/PageComponents/Map/NodeDetail.tsx

@ -26,9 +26,9 @@ export interface NodeDetailProps {
export const NodeDetail = ({ node }: NodeDetailProps) => {
const name = node.user?.longName || `!${numberToHexUnpadded(node.num)}`;
const hardwareType = Protobuf.Mesh.HardwareModel[
node.user?.hwModel ?? 0
].replaceAll("_", " ");
const hwModel = node.user?.hwModel ?? 0;
const hardwareType =
Protobuf.Mesh.HardwareModel[hwModel]?.replaceAll("_", " ") ?? `${hwModel}`;
return (
<div className="dark:text-black p-1">

Loading…
Cancel
Save