Fix build errors

This commit is contained in:
Tom Fifield
2024-05-27 12:08:32 +08:00
parent 54c983439c
commit e825a737b0
2 changed files with 4 additions and 3 deletions

View File

@@ -2,8 +2,8 @@ import { useDevice } from "@app/core/stores/deviceStore.js";
import type { Protobuf } from "@meshtastic/js";
export interface TraceRouteProps {
from: Protobuf.Mesh.NodeInfo;
to: Protobuf.Mesh.NodeInfo;
from?: Protobuf.Mesh.NodeInfo;
to?: Protobuf.Mesh.NodeInfo;
route: Array<number>;
}

View File

@@ -82,7 +82,8 @@ export const MessagesPage = (): JSX.Element => {
{
icon: WaypointsIcon,
async onClick() {
await connection?.traceRoute(nodes.get(activeChat)?.num).then(() =>
if (nodes.get(activeChat)?.num === undefined) return;
await connection?.traceRoute(nodes.get(activeChat)?.num!).then(() =>
toast({
title: `Traceroute sent.`,
}),