Skip to content

Commit

Permalink
Fixed bug in EventSourcingDddCommandStore. Closes #56
Browse files Browse the repository at this point in the history
  • Loading branch information
jezzsantos committed Nov 24, 2024
1 parent 96933cc commit ec5c95d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ public async Task<Result<TAggregateRoot, Error>> LoadAsync(Identifier id, Cancel
var lastPersistedAtUtc = events.Last().LastPersistedAtUtc;
var aggregate = RehydrateAggregateRoot(id, lastPersistedAtUtc);
aggregate.LoadChanges(events, _migrator);
var loaded = aggregate.LoadChanges(events, _migrator);
if (loaded.IsFailure)
{
return loaded.Error;
}
return aggregate;
});
Expand Down

0 comments on commit ec5c95d

Please sign in to comment.