Fix: replace map with forEach to avoid ignoring return value (S2201)

This commit is contained in:
jayamrutiya
2025-09-16 22:11:55 +05:30
parent 4b9153069e
commit 7c15a4c7ff

View File

@@ -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(