Fix removeListener if player embed api

pull/5250/head
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
1 changed files with 1 additions and 1 deletions

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
}