utils: Fix maybe_splice_recipient when "object" isn’t a map
This commit is contained in:
parent
0b88accae6
commit
53193b84b1
3 changed files with 9 additions and 4 deletions
|
|
@ -12,4 +12,10 @@ defmodule Pleroma.Maps do
|
|||
_ -> map
|
||||
end
|
||||
end
|
||||
|
||||
def safe_put_in(data, keys, value) when is_map(data) and is_list(keys) do
|
||||
Kernel.put_in(data, keys, value)
|
||||
rescue
|
||||
_ -> data
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue