Limit number of error messages

This commit is contained in:
Chris McCord 2021-11-10 15:07:46 -05:00
parent 0f384a3cb8
commit d9b5a61702

View file

@ -195,7 +195,7 @@ defmodule LiveBeatsWeb.SongLive.UploadFormComponent do
socket
|> cancel_upload(:mp3, entry.ref)
|> drop_changeset(entry.ref)
|> update(:error_messages, &(&1 ++ [{entry.client_name, reason}]))
|> update(:error_messages, &(Enum.take(&1 ++ [{entry.client_name, reason}], -10)))
end
defp get_entry!(socket, entry_ref) do