Skip to content

Commit

Permalink
only check triggered property on singular lifecycle events
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Jun 18, 2020
1 parent b1048aa commit 17f55c2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class LifecyclePhase<Args extends readonly any[]> {
}

public async trigger(...args: Args) {
if (this.triggered) {
if (this.options.singular && this.triggered) {
throw new Error(`singular lifecycle event can only be triggered once`);
}

Expand Down

0 comments on commit 17f55c2

Please sign in to comment.