Merge pull request #1960 from jayamrutiya/letmecheck/bug-return-value-not-be-ignored

Fix: replace map with for...of loop to avoid ignoring return value (S2201)
This commit is contained in:
Alex authored and GitHub committed 2025-10-03 14:15:39 +01:00
commit 7827a4d40d
1 file changed
+2 -4
+2 -4
View File
@@ -409,13 +409,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(