From c63401acf34e9d4e218340b496729bab987815f8 Mon Sep 17 00:00:00 2001 From: Andrew Shini <13059204+superandrew213@users.noreply.github.com> Date: Tue, 1 Feb 2022 21:19:56 +1000 Subject: [PATCH] cancel only session with sessionId --- react-native/src/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/react-native/src/index.js b/react-native/src/index.js index 16fe215..98def74 100644 --- a/react-native/src/index.js +++ b/react-native/src/index.js @@ -671,11 +671,9 @@ export class AbstractSession extends Session { /** * Cancels running the session. */ - cancel() { + async cancel() { const sessionId = this.getSessionId(); - if (sessionId === undefined) { - return FFmpegKitReactNativeModule.cancel(); - } else { + if (sessionId !== undefined) { return FFmpegKitReactNativeModule.cancelSession(sessionId); } }