diff options
author | Chris Schlaeger <chris@linux.com> | 2019-09-21 22:13:19 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2019-09-21 22:13:19 +0200 |
commit | c1c8f823a8cc5f001ba80a18c7d0677e55c27576 (patch) | |
tree | 3e2519476a9912a8f29c97072eb78b97c539d790 /lib | |
parent | f19f1b6d86e31392147bf2e96197cfcb771ee34d (diff) | |
download | postrunner-c1c8f823a8cc5f001ba80a18c7d0677e55c27576.zip |
Fix: Don't crash if HR data contains holes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/postrunner/ActivitySummary.rb | 2 |
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 |