Skip to content

Commit

Permalink
Merge pull request #6 from vheathen/fix_required_parameters_check
Browse files Browse the repository at this point in the history
Fix Geonames.Helpers.required_parameters_provided?/1 to correctly check params with boolean values
  • Loading branch information
pareeohnos authored Dec 13, 2021
2 parents b47ef0e + 7dccd82 commit 1974473
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 1974473

Please # to comment.