From abc0638e9b3af524e5ee1ff161a28841325c9ec1 Mon Sep 17 00:00:00 2001 From: hensm Date: Tue, 3 Sep 2019 16:22:12 +0100 Subject: [PATCH] Fix browser receiver selector file media handling --- ext/src/ui/popup/index.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ext/src/ui/popup/index.tsx b/ext/src/ui/popup/index.tsx index a7976b2..570ca89 100755 --- a/ext/src/ui/popup/index.tsx +++ b/ext/src/ui/popup/index.tsx @@ -183,17 +183,14 @@ class PopupApp extends Component<{}, PopupAppState> { const mediaType = parseInt(ev.target.value); if (mediaType === ReceiverSelectorMediaType.File) { - try { - const filePath = window.prompt(); - + const fileUrl = window.prompt(); + if (fileUrl) { this.setState({ mediaType - , filePath + , filePath: fileUrl.href }); return; - } catch (err) { - // Don't need to handle any errors } // Set media type to default if failed to set filePath