diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx index 46a36f4c..195d2435 100644 --- a/frontend/src/upload/Upload.tsx +++ b/frontend/src/upload/Upload.tsx @@ -358,13 +358,11 @@ function Upload({ [], ); if (data && Array.isArray(data)) { - data.map((updatedDoc: Doc) => { + for (const updatedDoc of data) { if (updatedDoc.id && !docIds.has(updatedDoc.id)) { - // Select the doc not present in the intersection of current Docs and fetched data dispatch(setSelectedDocs(updatedDoc)); - return; } - }); + } } }); setProgress(