From eb7f53deb19747f396af35cc8a4e077db4ee2c25 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Tue, 21 Feb 2023 20:48:32 +0530 Subject: [PATCH] move isElectron check outside try catch --- src/components/ExportModal.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ExportModal.tsx b/src/components/ExportModal.tsx index c115a1ca4..7f4dc6b06 100644 --- a/src/components/ExportModal.tsx +++ b/src/components/ExportModal.tsx @@ -70,10 +70,10 @@ export default function ExportModal(props: Props) { // SIDE EFFECTS // ==================== useEffect(() => { + if (!isElectron()) { + return; + } try { - if (!isElectron()) { - return; - } setExportFolder(getData(LS_KEYS.EXPORT)?.folder); exportService.electronAPIs.registerStopExportListener(stopExport);