1
0
Fork 0

Fix removeListener if player embed api

This commit is contained in:
Chocobozzz 2022-09-09 11:31:35 +02:00
parent 3d2e4f0371
commit c360e6cc1a
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

@ -41,7 +41,7 @@ export class EventRegistrar {
public removeListener<T> (name: string, handler: EventHandler<T>) {
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
}