*Don't bind this, but inject ourselves as the first argument
This commit is contained in:
parent
c9cfb64c80
commit
e5f4f59477
|
@ -57,10 +57,10 @@ export default class Peer {
|
||||||
this._proxy = proxy;
|
this._proxy = proxy;
|
||||||
this._peer = peer;
|
this._peer = peer;
|
||||||
this._muxer = muxer;
|
this._muxer = muxer;
|
||||||
this._onopen = onopen?.bind(this);
|
this._onopen = onopen?.bind(undefined, this);
|
||||||
this._onreceive = onreceive?.bind(this);
|
this._onreceive = onreceive?.bind(undefined, this);
|
||||||
this._onsend = onsend?.bind(this);
|
this._onsend = onsend?.bind(undefined, this);
|
||||||
this._onclose = onclose?.bind(this);
|
this._onclose = onclose?.bind(undefined, this);
|
||||||
this._emulateWebsocket = emulateWebsocket;
|
this._emulateWebsocket = emulateWebsocket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue