mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix removeListener if player embed api
This commit is contained in:
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
Block a user