Skip to content

Commit

Permalink
Merge pull request #171 from wkirschbaum/master
Browse files Browse the repository at this point in the history
Fix exclude_protocol_implementation check for Jason.Encoder
  • Loading branch information
kipcole9 authored Sep 17, 2024
2 parents 4c241b3 + f4cfd22 commit d9c1817
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/money/protocol/jason.ex
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
if Cldr.Config.ensure_compiled?(Jason) &&
!Money.exclude_protocol_implementation(Json.Encoder) do
!Money.exclude_protocol_implementation(Jason.Encoder) do
defimpl Jason.Encoder, for: Money do
def encode(struct, opts) do
struct
|> Map.take([:currency, :amount])
|> Jason.Encode.map(opts)
end
end
end
end

0 comments on commit d9c1817

Please sign in to comment.