summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2019-09-21 22:13:19 +0200
committerChris Schlaeger <chris@linux.com>2019-09-21 22:13:19 +0200
commitc1c8f823a8cc5f001ba80a18c7d0677e55c27576 (patch)
tree3e2519476a9912a8f29c97072eb78b97c539d790
parentf19f1b6d86e31392147bf2e96197cfcb771ee34d (diff)
downloadpostrunner-c1c8f823a8cc5f001ba80a18c7d0677e55c27576.zip
Fix: Don't crash if HR data contains holes.
-rw-r--r--lib/postrunner/ActivitySummary.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/postrunner/ActivitySummary.rb b/lib/postrunner/ActivitySummary.rb
index a5f14f6..48027c4 100644
--- a/lib/postrunner/ActivitySummary.rb
+++ b/lib/postrunner/ActivitySummary.rb
@@ -316,7 +316,7 @@ module PostRunner
if zone.type == 18
total_time = 0.0
if zone.time_in_hr_zone
- zone.time_in_hr_zone.each { |tiz| total_time += tiz }
+ zone.time_in_hr_zone.each { |tiz| total_time += tiz if tiz }
end
break if total_time <= 0.0
if zone.heart_rate_zones