*Don't bind this, but inject ourselves as the first argument

This commit is contained in:
Derrick Hammer 2023-03-02 05:30:14 -05:00
parent c9cfb64c80
commit e5f4f59477
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 4 deletions

View File

@ -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;
} }