Skip to content

Commit

Permalink
fix: pass all arguments to super.emit
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed May 17, 2022
1 parent b50390b commit 369b8f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Emitter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ export class Emitter extends Emittery<RunnerEvents> {
*/
public async emit<Name extends keyof RunnerEvents>(
eventName: Name,
eventData?: RunnerEvents[Name]
eventData?: RunnerEvents[Name],
allowMetaEvents?: boolean
): Promise<void> {
try {
await super.emit(eventName, eventData!)
await (super.emit as any)(eventName, eventData!, allowMetaEvents)
} catch (error) {
if (this.errorHandler) {
await this.errorHandler(error)
Expand Down

0 comments on commit 369b8f3

Please sign in to comment.