diff --git a/lib/commands/record-screen.js b/lib/commands/record-screen.js index 7adc3fa..210cfd5 100644 --- a/lib/commands/record-screen.js +++ b/lib/commands/record-screen.js @@ -252,6 +252,9 @@ export async function startRecordingScreen ( } this.log.debug('Forcing the active screen recording to stop'); await this._screenRecorder.stop(true); + } else if (this._screenRecorder) { + this.log.debug('Clearing the recent screen recording'); + await this._screenRecorder.stop(true); } this._screenRecorder = null;