add type check

This commit is contained in:
FloatingGhost 2023-08-07 16:09:10 +01:00
parent 40d5cbe37e
commit 6640ce7d24

View file

@ -77,7 +77,7 @@ defmodule HTTPSignatures do
end
# Sort map alphabetically to ensure stability
defp stable_sort_headers(headers) do
defp stable_sort_headers(headers) when is_map(headers) do
headers
|> Enum.into([])
|> Enum.sort_by(fn {k, _v} -> k end)