fix for feed page pagination

This commit is contained in:
Alexander Strizhakov 2020-03-10 18:11:48 +03:00
commit 26e2076659
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
5 changed files with 62 additions and 20 deletions

View file

@ -87,7 +87,8 @@ defmodule Pleroma.Web.ControllerHelper do
render_error(conn, :not_implemented, "Can't display this activity")
end
@spec put_in_if_exist(map(), atom() | String.t(), any) :: map()
def put_in_if_exist(map, _key, nil), do: map
def put_in_if_exist(map, key, value), do: put_in(map, key, value)
@spec put_if_exist(map(), atom() | String.t(), any) :: map()
def put_if_exist(map, _key, nil), do: map
def put_if_exist(map, key, value), do: Map.put(map, key, value)
end