X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f2e302c6a8c57b6f1902c7bf869b185b0a7f25d5..23479067254696a9a59f89deeff93e22e0f3e661:/lib/gpx.rb diff --git a/lib/gpx.rb b/lib/gpx.rb index 1bf7764ec..45a4dcf5f 100644 --- a/lib/gpx.rb +++ b/lib/gpx.rb @@ -27,7 +27,7 @@ module GPX point.timestamp = Time.parse(reader.read_string).utc end when XML::Reader::TYPE_END_ELEMENT - if reader.name == "trkpt" && point && point.valid? + if reader.name == "trkpt" && point&.valid? point.altitude ||= 0 yield point @actual_points += 1