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
2025-10-03 14:15:39 +01:00
committed by GitHub

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(