Skip to content

Commit

Permalink
Let use do the merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gotthardp committed Apr 1, 2019
1 parent 100715c commit b149b66
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lorawan_application_backend.erl
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,11 @@ handle_downlink(AppName, VarsGiven) ->
[#handler{build=Build}=Handler] = mnesia:dirty_read(handler, AppName),
case fields_to_data(AppName, Build, VarsGiven) of
Map when is_map(Map) ->
invoke_downlink(Handler,
maps:merge(VarsGiven, Map));
invoke_downlink(Handler, Map);
List when is_list(List) ->
lists:foreach(
fun(Item) ->
invoke_downlink(Handler,
maps:merge(VarsGiven, Item))
invoke_downlink(Handler, Item)
end,
List);
Data ->
Expand Down

0 comments on commit b149b66

Please sign in to comment.