소스 검색

refactor: change `removeListener` to `off` for consitency

Jonas Gloning 1 년 전
부모
커밋
15311d9940
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/eventEmitterWithPromise.ts

+ 1 - 1
lib/eventEmitterWithPromise.ts

@@ -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) {