From 40d44a09774c5f9c88caa704b29ae0156716c345 Mon Sep 17 00:00:00 2001 From: Matthias Van Parijs Date: Fri, 18 Aug 2023 11:57:29 +0200 Subject: [PATCH] Fixed not being able to unsubscribe events --- packages/ffmpeg/src/classes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ffmpeg/src/classes.ts b/packages/ffmpeg/src/classes.ts index 8dd50e2560..bb366d9cba 100644 --- a/packages/ffmpeg/src/classes.ts +++ b/packages/ffmpeg/src/classes.ts @@ -148,9 +148,9 @@ export class FFmpeg { callback: LogEventCallback | ProgressEventCallback ) { if (event === "log") { - this.#logEventCallbacks.filter((f) => f !== callback); + this.#logEventCallbacks = this.#logEventCallbacks.filter((f) => f !== callback); } else if (event === "progress") { - this.#progressEventCallbacks.filter((f) => f !== callback); + this.#progressEventCallbacks = this.#progressEventCallbacks.filter((f) => f !== callback); } }