Procházet zdrojové kódy

fix type error after merge

Mike Plante před 2 roky
rodič
revize
424febc7cb
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      LiveActivity/LiveActivity.swift

+ 1 - 1
LiveActivity/LiveActivity.swift

@@ -77,7 +77,7 @@ struct LiveActivity: Widget {
                 ForEach(context.state.chart.indices, id: \.self) { index in
                 ForEach(context.state.chart.indices, id: \.self) { index in
                     LineMark(
                     LineMark(
                         x: .value("Time", context.state.chartDate[index] ?? Date()),
                         x: .value("Time", context.state.chartDate[index] ?? Date()),
-                        y: .value("Value", context.state.chart[index])
+                        y: .value("Value", context.state.chart[index] ?? 0)
                     ).foregroundStyle(Color.green.gradient).symbolSize(12)
                     ).foregroundStyle(Color.green.gradient).symbolSize(12)
                 }
                 }
             }.chartPlotStyle { plotContent in
             }.chartPlotStyle { plotContent in