fix(tracks) don't throw if creating a desktop track fails

There is nobody to catch it and we already show the error as a
notification.
This commit is contained in:
Saúl Ibarra Corretgé
2025-02-06 13:31:54 +01:00
committed by Saúl Ibarra Corretgé
parent a27b78cef0
commit ff656f4e6b

View File

@@ -159,7 +159,7 @@ async function _toggleScreenSharing(
} catch (error) {
dispatch(handleScreenSharingError(error));
throw error;
return;
}
}
@@ -173,7 +173,7 @@ async function _toggleScreenSharing(
if (!desktopAudioTrack) {
dispatch(handleScreenSharingError(AUDIO_ONLY_SCREEN_SHARE_NO_TRACK));
throw new Error(AUDIO_ONLY_SCREEN_SHARE_NO_TRACK);
return;
}
} else if (desktopVideoTrack) {
if (localScreenshare) {