From 330e52a896dc3c3015d89f5506db9954669de534 Mon Sep 17 00:00:00 2001 From: meissadia Date: Fri, 20 Dec 2019 13:27:30 -0700 Subject: [PATCH] Replace use of Object.entries() --- src/filing/submission/parseErrors/index.jsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/filing/submission/parseErrors/index.jsx b/src/filing/submission/parseErrors/index.jsx index 32088e020..e51888747 100644 --- a/src/filing/submission/parseErrors/index.jsx +++ b/src/filing/submission/parseErrors/index.jsx @@ -133,9 +133,9 @@ class ParseErrors extends Component { function errorResponseParser(errorResponse, uliNeeded) { let apiErrorMessages = [] - errorResponse.forEach(function(errorsFound,i) { - if(errorsFound && errorsFound.errorMessages) { - for (const [index, errorMessage] of errorsFound.errorMessages.entries()) { + errorResponse.forEach(function (errorsFound, i) { + if (errorsFound && errorsFound.errorMessages) { + errorsFound.errorMessages.forEach(function (errorMessage, index) { let inputContent = errorMessage.inputValue if (errorMessage.inputValue === '') inputContent = (blank) @@ -143,15 +143,16 @@ function errorResponseParser(errorResponse, uliNeeded) { apiErrorMessages.push( {errorsFound.rowNumber} - {uliNeeded ? {errorsFound.estimatedULI}:null} + {uliNeeded ? {errorsFound.estimatedULI} : null} {errorMessage.fieldName} {inputContent} - {errorMessage.validValues} - + {errorMessage.validValues} + ) - } + }) } }) + return apiErrorMessages }