Skip to content

Commit

Permalink
fix(tracks) don't throw if creating a desktop track fails
Browse files Browse the repository at this point in the history
There is nobody to catch it and we already show the error as a
notification.
  • Loading branch information
saghul committed Feb 6, 2025
1 parent 88e1c06 commit 2ae6b69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions react/features/base/tracks/actions.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ async function _toggleScreenSharing(
} catch (error) {
dispatch(handleScreenSharingError(error, NOTIFICATION_TIMEOUT_TYPE.MEDIUM));

throw error;
return;
}
}

Expand All @@ -173,7 +173,7 @@ async function _toggleScreenSharing(
if (!desktopAudioTrack) {
dispatch(handleScreenSharingError(AUDIO_ONLY_SCREEN_SHARE_NO_TRACK, NOTIFICATION_TIMEOUT_TYPE.MEDIUM));

throw new Error(AUDIO_ONLY_SCREEN_SHARE_NO_TRACK);
return;
}
} else if (desktopVideoTrack) {
if (localScreenshare) {
Expand Down

0 comments on commit 2ae6b69

Please sign in to comment.