fix: properly return unwrapped list of errors when :special class is used

This commit is contained in:
Zach Daniel 2024-05-01 23:22:24 -04:00
parent 61d76e5be3
commit 623b27bd90

View file

@ -185,7 +185,7 @@ defmodule Splode do
if Enum.count_until(errors, 2) == 1 &&
Enum.at(errors, 0).class == :special do
[List.first(errors)]
List.first(errors)
else
values
|> flatten_preserving_keywords()