From aff12411b78830130ae6fdcf7967112ba975b76b Mon Sep 17 00:00:00 2001 From: Abhinav Date: Tue, 28 Jun 2022 12:42:20 +0530 Subject: [PATCH] set types also for web uploads --- src/components/pages/gallery/Upload.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/pages/gallery/Upload.tsx b/src/components/pages/gallery/Upload.tsx index e7ae32cc0..188c972fb 100644 --- a/src/components/pages/gallery/Upload.tsx +++ b/src/components/pages/gallery/Upload.tsx @@ -201,10 +201,7 @@ export default function Upload(props: Props) { }; function analyseUploadFiles(): AnalysisResult { - if ( - isElectron() && - (!uploadType.current || uploadType.current === UPLOAD_TYPE.FILES) - ) { + if (isElectron() && uploadType.current === UPLOAD_TYPE.FILES) { return NULL_ANALYSIS_RESULT; } @@ -498,6 +495,7 @@ export default function Upload(props: Props) { }; const handleWebUpload = async (type: UPLOAD_TYPE) => { + uploadType.current = type; if (type === UPLOAD_TYPE.FILES) { props.showUploadFilesDialog(); } else if (type === UPLOAD_TYPE.FOLDERS) {