Skip to content

Commit

Permalink
Skip serialisation for nil values
Browse files Browse the repository at this point in the history
  • Loading branch information
rschef committed Jan 12, 2023
1 parent b122585 commit f5150b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/paper_trail/serializer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ defmodule PaperTrail.Serializer do
dumped_value =
cond do
match?({:array, _}, type) and Enum.any?(ignored_ecto_types(), & type == {:array, &1}) ->
Enum.map(value, &serialize_binary/1)
value && Enum.map(value, &serialize_binary/1)

type in ignored_ecto_types() ->
serialize_binary(value)
Expand Down

0 comments on commit f5150b3

Please sign in to comment.