From a685735d932b20295f74fc63b29e9180bd158347 Mon Sep 17 00:00:00 2001 From: Alex Reisner <alex@alexreisner.com> Date: Mon, 21 Sep 2009 16:48:59 -0400 Subject: [PATCH] Don't attempt to process null reponse from Google. --- lib/geocoder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/geocoder.rb b/lib/geocoder.rb index 3c8a5d5e..793056d3 100644 --- a/lib/geocoder.rb +++ b/lib/geocoder.rb @@ -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'] -- GitLab