From: FloatingGhost Date: Tue, 8 Nov 2022 13:50:04 +0000 (+0000) Subject: fix count of poll voters X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;h=4e8ab0deeb16e942bb677c5f0fc7dc6ba1508801;p=akkoma fix count of poll voters --- diff --git a/lib/pleroma/web/mastodon_api/views/poll_view.ex b/lib/pleroma/web/mastodon_api/views/poll_view.ex index 71bc8b949..aa6443754 100644 --- a/lib/pleroma/web/mastodon_api/views/poll_view.ex +++ b/lib/pleroma/web/mastodon_api/views/poll_view.ex @@ -68,7 +68,7 @@ defmodule Pleroma.Web.MastodonAPI.PollView do end) end - defp voters_count(%{data: %{"voters" => [_ | _] = voters}}) do + defp voters_count(%{data: %{"voters" => voters}}) when is_list(voters) do length(voters) end