diff Sources/StockCharts/LineChart/Helpers/LinePath.swift @ 95:468e6857c4ce

Unwrap optional path.current
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Wed, 16 Jun 2021 16:01:35 +0200
parents b0eddc386535
children
line wrap: on
line diff
--- a/Sources/StockCharts/LineChart/Helpers/LinePath.swift	Sun Jun 06 18:47:19 2021 +0200
+++ b/Sources/StockCharts/LineChart/Helpers/LinePath.swift	Wed Jun 16 16:01:35 2021 +0200
@@ -31,7 +31,7 @@
             }
 
             // Append current point to an array. Later will be used for Drag Gesture
-            pathPoints.append(path.currentPoint!)
+            pathPoints.append(path.currentPoint ?? CGPoint(x: 0, y: 0))
         }
         
         DispatchQueue.main.async {