mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
Fix: replace map with forEach to avoid ignoring return value (S2201)
This commit is contained in:
@@ -358,13 +358,11 @@ function Upload({
|
|||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
if (data && Array.isArray(data)) {
|
if (data && Array.isArray(data)) {
|
||||||
data.map((updatedDoc: Doc) => {
|
for (const updatedDoc of data) {
|
||||||
if (updatedDoc.id && !docIds.has(updatedDoc.id)) {
|
if (updatedDoc.id && !docIds.has(updatedDoc.id)) {
|
||||||
// Select the doc not present in the intersection of current Docs and fetched data
|
|
||||||
dispatch(setSelectedDocs(updatedDoc));
|
dispatch(setSelectedDocs(updatedDoc));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setProgress(
|
setProgress(
|
||||||
|
|||||||
Reference in New Issue
Block a user