mirror of https://github.com/Chocobozzz/PeerTube
Fix removeListener if player embed api
parent
3d2e4f0371
commit
c360e6cc1a
|
@ -41,7 +41,7 @@ export class EventRegistrar {
|
||||||
public removeListener<T> (name: string, handler: EventHandler<T>) {
|
public removeListener<T> (name: string, handler: EventHandler<T>) {
|
||||||
if (!this.eventRegistrations[name]) return false
|
if (!this.eventRegistrations[name]) return false
|
||||||
|
|
||||||
this.eventRegistrations[name].registrations = this.eventRegistrations[name].registrations.filter(x => x === handler)
|
this.eventRegistrations[name].registrations = this.eventRegistrations[name].registrations.filter(x => x !== handler)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue