Skip to content
Snippets Groups Projects
Commit 2dcbeba1 authored by alexreisner's avatar alexreisner
Browse files

Don't query Google with empty string.

parent dc2f00c9
No related branches found
No related tags found
No related merge requests found
......@@ -213,6 +213,7 @@ module Geocoder
# Returns array [lat,lon] if found, nil if not found or if network error.
#
def self.fetch_coordinates(query)
return nil if query.blank?
return nil unless doc = self.search(query)
# make sure search found a result
......
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