use forEach
This commit is contained in:
parent
49521ea610
commit
6d1a763ba9
|
@ -416,12 +416,12 @@ export default function ProcessModelShow() {
|
||||||
|
|
||||||
const checkDuplicateFile = (event: any) => {
|
const checkDuplicateFile = (event: any) => {
|
||||||
if (processModel && processModel.files.length > 0) {
|
if (processModel && processModel.files.length > 0) {
|
||||||
for (const file in processModel.files) {
|
processModel.files.forEach((file) => {
|
||||||
if (processModel.files[file].name === filesToUpload[0].name) {
|
if (file.name === filesToUpload[0].name) {
|
||||||
displayOverwriteConfirmation(processModel.files[file].name);
|
displayOverwriteConfirmation(file.name);
|
||||||
setFileUploadEvent(event);
|
setFileUploadEvent(event);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue