Skip to content

Commit

Permalink
Fix aggregateRoot pull events
Browse files Browse the repository at this point in the history
  • Loading branch information
mapeveri committed Aug 24, 2024
1 parent 70d8620 commit 5c3cd0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/domain/aggregate/aggregateRoot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export abstract class AggregateRoot {
}

pullDomainEvents(): DomainEvent[] {
const domainEvents = this.domainEvents;
const domainEvents = this.domainEvents || [];
this.domainEvents = [];
return domainEvents;
}
Expand Down

0 comments on commit 5c3cd0f

Please sign in to comment.