From 6d1a763ba9d1109687344f4893bfd6650691d583 Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Tue, 13 Dec 2022 15:57:46 -0500 Subject: [PATCH] use forEach --- spiffworkflow-frontend/src/routes/ProcessModelShow.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx b/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx index c5765d89..dbe91409 100644 --- a/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx @@ -416,12 +416,12 @@ export default function ProcessModelShow() { const checkDuplicateFile = (event: any) => { if (processModel && processModel.files.length > 0) { - for (const file in processModel.files) { - if (processModel.files[file].name === filesToUpload[0].name) { - displayOverwriteConfirmation(processModel.files[file].name); + processModel.files.forEach((file) => { + if (file.name === filesToUpload[0].name) { + displayOverwriteConfirmation(file.name); setFileUploadEvent(event); } - } + }); } };