We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 506b230 commit d8d1c38Copy full SHA for d8d1c38
lib/iteraptor/utils.ex
@@ -106,7 +106,7 @@ defmodule Iteraptor.Utils do
106
def smart_convert(value) do
107
case value |> to_string() |> Integer.parse() do
108
{value, ""} -> value
109
- _ -> String.to_existing_atom(value)
+ _ -> try do String.to_existing_atom(value) rescue ArgumentError -> String.to_atom(value) end
110
end
111
112
0 commit comments