]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix removeListener if player embed api
authorChocobozzz <me@florianbigard.com>
Fri, 9 Sep 2022 09:31:35 +0000 (11:31 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 9 Sep 2022 09:31:35 +0000 (11:31 +0200)
client/src/standalone/player/events.ts

index 7a8e9dbec0e243e64c420f58b1fe6355a048b6b8..77d21c78c469b94541b5dbb5614e75d5e972809c 100644 (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
   }