From 68854dee50dd408cad9c8d46a5985e042ad71947 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Thu, 10 Aug 2023 12:04:16 -0700 Subject: [PATCH] Handle nil better --- Meshtastic/Views/Nodes/EnvironmentMetricsLog.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meshtastic/Views/Nodes/EnvironmentMetricsLog.swift b/Meshtastic/Views/Nodes/EnvironmentMetricsLog.swift index 0e5f13fe..26e24e21 100644 --- a/Meshtastic/Views/Nodes/EnvironmentMetricsLog.swift +++ b/Meshtastic/Views/Nodes/EnvironmentMetricsLog.swift @@ -206,7 +206,7 @@ struct EnvironmentMetricsLog: View { isPresented: $isExporting, document: CsvDocument(emptyCsv: exportString), contentType: .commaSeparatedText, - defaultFilename: String("\(node.user!.longName ?? "Node") Environment Metrics Log"), + defaultFilename: String("\(node.user?.longName ?? "Node") Environment Metrics Log"), onCompletion: { result in if case .success = result { print("Environment metrics log download succeeded.")