Skip to content

Commit

Permalink
Fix styles other than the default
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Jun 18, 2019
1 parent ebcbf66 commit fe8e355
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/cldr/unit.ex
Original file line number Diff line number Diff line change
Expand Up @@ -876,13 +876,13 @@ defmodule Cldr.Unit do
end

defp normalize_options(backend, options) do
locale = options[:locale] || backend.get_locale()
style = options[:style] || @default_style
locale = Keyword.get(options, :locale, backend.get_locale())
style = Keyword.get(options, :style, @default_style)

options =
options
|> Keyword.delete(:locale)
|> Keyword.delete(:style)
|> Keyword.put(:style, style)

{locale, style, options}
end
Expand Down

0 comments on commit fe8e355

Please sign in to comment.