Handle no selected screen when screen-sharing (#7018)

This commit is contained in:
Šimon Brandner 2021-10-25 11:44:37 +02:00 committed by GitHub
parent 1256b1ef2a
commit 75c7daa2c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -278,6 +278,8 @@ export default class CallView extends React.Component<IProps, IState> {
if (window.electron?.getDesktopCapturerSources) {
const { finished } = Modal.createDialog(DesktopCapturerSourcePicker);
const [source] = await finished;
if (!source) return;
isScreensharing = await this.props.call.setScreensharingEnabled(true, source);
} else {
isScreensharing = await this.props.call.setScreensharingEnabled(true);