Skip to content

Commit

Permalink
Return empty array when no results.
Browse files Browse the repository at this point in the history
Previously nil was being returned on API errors,
which caused un-helpful exceptions.
  • Loading branch information
alexreisner committed Feb 20, 2014
1 parent b707a1e commit 15561da
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/geocoder/lookups/mapquest.rb
Expand Up @@ -53,6 +53,7 @@ def results(query)
raise_error(Geocoder::Error, messages) ||
warn("Mapquest Geocoding API error: #{messages}")
end
[]
end

end
Expand Down

0 comments on commit 15561da

Please sign in to comment.