Skip to content

Commit 81f6d3a

Browse files
committed
handle tuples in normalize_struct/1
1 parent 0bcf004 commit 81f6d3a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/algora/shared/util.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ defmodule Algora.Util do
105105
Enum.map(list, &normalize_struct/1)
106106
end
107107

108+
def normalize_struct(tuple) when is_tuple(tuple) do
109+
tuple |> Tuple.to_list() |> normalize_struct()
110+
end
111+
108112
def normalize_struct(value), do: value
109113

110114
def format_name_list([x]), do: x

0 commit comments

Comments
 (0)