From 2f72796ae72af4ebdae99d497150faf5bb4efecd Mon Sep 17 00:00:00 2001 From: Stephan Raab Date: Mon, 8 Apr 2024 22:17:24 +0200 Subject: [PATCH] Fix share cancel button in element-desktop --- src/vector/platform/ElectronPlatform.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index fdb46bb0eb..b7a1be1bbe 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -170,7 +170,12 @@ export default class ElectronPlatform extends VectorBasePlatform { window.electron.on("openDesktopCapturerSourcePicker", () => { const { finished } = Modal.createDialog(DesktopCapturerSourcePicker); finished.then(([source]) => { - if (!source) return; + if (!source) + source = { + id: "", + name: "", + thumbnailURL: "" + }; this.ipc.call("callDisplayMediaCallback", source); }); });