Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Commit

Permalink
Fix runtime error when waypoints not present
Browse files Browse the repository at this point in the history
If a run doesn't have any GPS data, waypoints will be nil
and the import fails.
  • Loading branch information
pfhayes authored and aron committed Feb 24, 2014
1 parent 9d62f42 commit 21414d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def signed_in?
average_heart_rate: nike_activity.average_heart_rate.to_f
}

if a.gps && nike_activity.geo
if a.gps && nike_activity.geo && nike_activity.geo.waypoints
index = -1
total = nike_activity.geo.waypoints.size
fraction = duration.to_f / total.to_f
Expand Down

0 comments on commit 21414d8

Please sign in to comment.