Commit b1705491 authored by lazorfuzz's avatar lazorfuzz
Browse files

Fix channelOpen event emitting wrong object

parent 912f7223
......@@ -169,7 +169,7 @@ class Peer extends WildEmitter {
channel.onmessage = (event) => {
self.emit('channelMessage', self, channel.label, JSON.parse(event.data), channel, event);
};
channel.onopen = this.emit.bind(this, 'channelOpen', channel, self);
channel.onopen = this.emit.bind(this, 'channelOpen', channel, this);
}
// Fetch or create a data channel by the given name
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment