From 8b59010de893fee254dd86ed9ebc8775d4df24f0 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Fri, 19 Jan 2024 17:36:50 -0300 Subject: [PATCH] mini-video-recorder: Fix starting records of unconfigured widgets In case a video recorder widget was never configured for some stream, it would throw an error instead of allowing selecting one. --- src/components/mini-widgets/MiniVideoRecorder.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/mini-widgets/MiniVideoRecorder.vue b/src/components/mini-widgets/MiniVideoRecorder.vue index 9b7a3432b..adb60c8b7 100644 --- a/src/components/mini-widgets/MiniVideoRecorder.vue +++ b/src/components/mini-widgets/MiniVideoRecorder.vue @@ -98,12 +98,10 @@ watch(nameSelectedStream, () => { }) const toggleRecording = async (): Promise => { - if (nameSelectedStream.value === undefined) { - Swal.fire({ text: 'No stream selected. Please choose one before continuing.', icon: 'error' }) - return - } if (isRecording.value) { - videoStore.stopRecording(nameSelectedStream.value) + if (nameSelectedStream.value !== undefined) { + videoStore.stopRecording(nameSelectedStream.value) + } return } // Open dialog so user can choose the stream which will be recorded