Skip to content

Commit

Permalink
refactor: change removeListener to off for consitency
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgloning committed Sep 7, 2023
1 parent 54e2ac6 commit 15311d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/eventEmitterWithPromise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class EventEmitterWithPromise<
resolve?.(proxyWithoutThen(this));
};
const onError = (err: PeerError<`${ErrorType}`>) => {
this.removeListener("open", onOpen);
this.off("open", onOpen);
reject(err);
};
if (this._open) {
Expand Down

0 comments on commit 15311d9

Please sign in to comment.