Skip to content

Commit

Permalink
Make sure code is loaded before checking function_exported?, or it wi…
Browse files Browse the repository at this point in the history
…ll be false (#794)
  • Loading branch information
sb8244 committed Apr 10, 2023
1 parent 3768300 commit cf385a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stripe/converter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ defmodule Stripe.Converter do
end

defp known_struct?(struct) do
function_exported?(struct, :__struct__, 0)
Code.ensure_loaded?(struct) && function_exported?(struct, :__struct__, 0)
end
end

0 comments on commit cf385a4

Please sign in to comment.