Skip to content

Commit

Permalink
Handles custom styles correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
cristineguadelupe committed Mar 14, 2024
1 parent 5530480 commit 387725a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/maplibre.ex
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ defmodule MapLibre do

@compile {:no_warn_undefined, {Req, :get!, 2}}

defp to_style(%{}, _key), do: %{"version" => 8}
defp to_style(style, _key) when style == %{}, do: %{"version" => 8}
defp to_style(style, key) when is_atom(style), do: Styles.style(style, key)
defp to_style(style, _key) when is_map(style), do: style

Expand Down

0 comments on commit 387725a

Please sign in to comment.