Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(DesktopPicker): Stops displaying if closed too fast.

Hristo Terezov3c7829a457ab
diff --git a/react/features/desktop-picker/components/DesktopPicker.tsx b/react/features/desktop-picker/components/DesktopPicker.tsx
index d61447a16a..3442b641bb 100644
--- a/react/features/desktop-picker/components/DesktopPicker.tsx
+++ b/react/features/desktop-picker/components/DesktopPicker.tsx
@@ -275,7 +275,7 @@ class DesktopPicker extends PureComponent<IProps, IState> {
const { sources } = this.state;
// @ts-ignore
- const source = sources.screen.concat(sources.window).find(s => s.id === id);
+ const source = (sources?.screen ?? []).concat(sources?.window ?? []).find(s => s.id === id);
this.props.onSourceChoose(id, type, screenShareAudio, source);
this.props.dispatch(hideDialog());