Skip to content

Commit

Permalink
Fix support for multiple hooks in attach_hook (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
NduatiK authored May 31, 2023
1 parent bcafdef commit 006650c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/axon.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3139,7 +3139,7 @@ defmodule Axon do

updated_nodes =
Map.update!(nodes, id, fn axon_node ->
%{axon_node | hooks: [{on_event, mode, fun}]}
%{axon_node | hooks: [{on_event, mode, fun} | axon_node.hooks]}
end)

%{axon | nodes: updated_nodes}
Expand Down

0 comments on commit 006650c

Please sign in to comment.