fix for feed page pagination
This commit is contained in:
parent
34fd1c2c9d
commit
26e2076659
5 changed files with 62 additions and 20 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue