From f464c4280283dbc6504545d6513acd4263daede1 Mon Sep 17 00:00:00 2001 From: Aarnav Tale Date: Fri, 10 Jan 2025 14:41:05 +0530 Subject: [PATCH] fix: format hostinfo in overview correctly --- app/routes/machines/overview.tsx | 2 +- app/utils/host-info.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes/machines/overview.tsx b/app/routes/machines/overview.tsx index 2e25de5..adf22d4 100644 --- a/app/routes/machines/overview.tsx +++ b/app/routes/machines/overview.tsx @@ -86,7 +86,7 @@ export default function Page() { Name - +
Addresses {data.magic ? ( diff --git a/app/utils/host-info.ts b/app/utils/host-info.ts index bb105a1..bb18a04 100644 --- a/app/utils/host-info.ts +++ b/app/utils/host-info.ts @@ -16,7 +16,7 @@ export function getOSInfo(host: HostInfo) { const formattedOS = formatOS(OS); // Trim in case OSVersion is empty - return `${formattedOS} ${OSVersion}`.trim(); + return `${formattedOS} ${OSVersion ?? ''}`.trim(); } function formatOS(os?: string) {