Skip to content

Commit

Permalink
Fix Geonames.Helpers.required_parameters_provided?/1 to correctly che…
Browse files Browse the repository at this point in the history
…ck params with boolean values
  • Loading branch information
vheathen committed Dec 12, 2021
1 parent b47ef0e commit 7dccd82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/geonames/helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Geonames.Helpers do
request parameters have been set
"""
def required_parameters_provided?(required, opts),
do: Enum.all?(required, &Map.get(opts, &1))
do: Enum.all?(required, fn key -> !is_nil(Map.get(opts, key)) end)

@doc """
For each request to the GeoNames API, the
Expand Down

0 comments on commit 7dccd82

Please # to comment.