Skip to content

Commit

Permalink
mini-video-recorder: Fix starting records of unconfigured widgets
Browse files Browse the repository at this point in the history
In case a video recorder widget was never configured for some stream, it would throw an error instead of allowing selecting one.
  • Loading branch information
rafaellehmkuhl committed Jan 19, 2024
1 parent f8d3f98 commit 8b59010
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/mini-widgets/MiniVideoRecorder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,10 @@ watch(nameSelectedStream, () => {
})
const toggleRecording = async (): Promise<void> => {
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
Expand Down

0 comments on commit 8b59010

Please sign in to comment.