FIX a critical api missing

This commit is contained in:
Norbert de Langen 2019-09-30 23:11:00 +02:00
parent 8e44132e99
commit 8a53bb3969

View File

@ -126,6 +126,10 @@ export class Channel {
this.addListener(eventName, listener);
}
off(eventName: string, listener: Listener) {
this.removeListener(eventName, listener);
}
private handleEvent(event: ChannelEvent, isPeer = false) {
const listeners = this.listeners(event.type);
if (listeners && (isPeer || event.from !== this.sender)) {