Skip to content

Commit

Permalink
Merge pull request #16 from nash-io/skip-list-serialization-for-nil-v…
Browse files Browse the repository at this point in the history
…alues

Skip serialisation for nil values
  • Loading branch information
rschef authored Jan 12, 2023
2 parents 6de8d8d + f5150b3 commit 0bf4f9e
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 0bf4f9e

Please sign in to comment.