Skip to content

Commit

Permalink
Yandex fix. No more "found" param in meta section (#1448)
Browse files Browse the repository at this point in the history
Yandex fix. No more "found" param in meta section
  • Loading branch information
HatlamMe committed Apr 23, 2020
1 parent 5ce27f0 commit ef1afc5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/geocoder/lookups/yandex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def results(query)
return []
end
if doc = doc['response']['GeoObjectCollection']
meta = doc['metaDataProperty']['GeocoderResponseMetaData']
return meta['found'].to_i > 0 ? doc['featureMember'] : []
return doc['featureMember'].to_a
else
Geocoder.log(:warn, "Yandex Geocoding API error: unexpected response format.")
return []
Expand Down

0 comments on commit ef1afc5

Please sign in to comment.