Skip to content
Snippets Groups Projects
Commit a685735d authored by Alex Reisner's avatar Alex Reisner
Browse files

Don't attempt to process null reponse from Google.

parent 3fc19ae4
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ module Geocoder
# Returns array [lat,lon] if found, nil if not found or if network error.
#
def self.fetch_coordinates(query)
doc = self.search(query)
return nil unless doc = self.search(query)
# Make sure search found a result.
e = doc.elements['kml/Response/Status/code']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment