From 77f5d669fa7fe277968bd3500544beaaa98ebf72 Mon Sep 17 00:00:00 2001 From: Sonia Appasamy Date: Tue, 12 Dec 2023 17:16:46 -0500 Subject: [PATCH] client/web: fix key expiry text when expiry disabled Displays "No expiry" when disabled. Updates #10261 Signed-off-by: Sonia Appasamy --- client/web/src/components/views/device-details-view.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/web/src/components/views/device-details-view.tsx b/client/web/src/components/views/device-details-view.tsx index 9cc6e9e16..d4fd32d27 100644 --- a/client/web/src/components/views/device-details-view.tsx +++ b/client/web/src/components/views/device-details-view.tsx @@ -94,7 +94,9 @@ export default function DeviceDetailsView({ {node.KeyExpired ? "Expired" : // TODO: present as relative expiry (e.g. "5 months from now") - new Date(node.KeyExpiry).toLocaleString()} + node.KeyExpiry + ? new Date(node.KeyExpiry).toLocaleString() + : "No expiry"}