Преглед изворни кода

fix type error after merge

Mike Plante пре 2 година
родитељ
комит
424febc7cb
1 измењених фајлова са 1 додато и 1 уклоњено
  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