Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mizrael committed Aug 13, 2024
1 parent e366b81 commit fabe542
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/EvenireDB/EventsWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ public async ValueTask<IOperationResult> AppendAsync(
_logger.AppendingEventsToStream(incomingEvents.Count(), streamId);

var events = new List<Event>();

EventId? previousEventId = null;
var lastEvent = entry.Events.LastOrDefault();
if(lastEvent != null)
previousEventId = lastEvent.Id;

for (int i = 0; i < incomingEvents.Count(); i++)
{
var eventData = incomingEvents.ElementAt(i);
Expand Down

0 comments on commit fabe542

Please sign in to comment.