Skip to content

Commit

Permalink
Include #244 in CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
slashdotdash committed Jan 21, 2019
1 parent 15b99df commit 25967de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Allow two-arity predicate function in `wait_for_event` receiving both event data and recorded event struct ([#213](https://github.com/commanded/commanded/pull/213)).
- Allow `:infinity` timeout on command dispatch ([#227](https://github.com/commanded/commanded/pull/227))
- Strict process manager routing ([#243](https://github.com/commanded/commanded/pull/243)).
- Allow `Commanded.Aggregate.Multi` to be nested ([#244](https://github.com/commanded/commanded/pull/244)).

### Bug fixes

Expand Down
6 changes: 2 additions & 4 deletions lib/commanded/aggregates/multi.ex
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,8 @@ defmodule Commanded.Aggregate.Multi do
"""
@spec reduce(Multi.t(), Enum.t(), function()) :: Multi.t()
def reduce(%Multi{} = multi, enumerable, execute_fun) when is_function(execute_fun, 2) do
execute(multi, fn aggregate ->
Enum.reduce(enumerable, Multi.new(aggregate), fn item, %Multi{} = multi ->
execute(multi, &execute_fun.(&1, item))
end)
Enum.reduce(enumerable, multi, fn item, %Multi{} = multi ->
execute(multi, &execute_fun.(&1, item))
end)
end

Expand Down

0 comments on commit 25967de

Please sign in to comment.