Skip to content

Commit ef1afc5

Browse files
authored
Yandex fix. No more "found" param in meta section (#1448)
Yandex fix. No more "found" param in meta section
1 parent 5ce27f0 commit ef1afc5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/geocoder/lookups/yandex.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ def results(query)
3333
return []
3434
end
3535
if doc = doc['response']['GeoObjectCollection']
36-
meta = doc['metaDataProperty']['GeocoderResponseMetaData']
37-
return meta['found'].to_i > 0 ? doc['featureMember'] : []
36+
return doc['featureMember'].to_a
3837
else
3938
Geocoder.log(:warn, "Yandex Geocoding API error: unexpected response format.")
4039
return []

0 commit comments

Comments
 (0)