Explorar el Código

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

Jonas Gloning hace 1 año
padre
commit
15311d9940
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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) {