Guard for nil in result country

pull/83/head
Uku Taht 7 years ago
parent c9e8c8ce99
commit c42f8ea5c6

@ -88,7 +88,7 @@ defmodule PlausibleWeb.Api.ExternalController do
|> Geolix.lookup()
|> Map.get(:country)
if result do
if result && result.country do
result.country.iso_code
end
end

Loading…
Cancel
Save