From 7c15a4c7ffe4699c5e3952974c475639972c5bb1 Mon Sep 17 00:00:00 2001 From: jayamrutiya Date: Tue, 16 Sep 2025 22:11:55 +0530 Subject: [PATCH] Fix: replace map with forEach to avoid ignoring return value (S2201) --- frontend/src/upload/Upload.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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(