From 7dc219acb320af5cb091c2f8e8be794688dc10e7 Mon Sep 17 00:00:00 2001 From: Teal Hobson-Lowther Date: Wed, 3 Oct 2018 17:31:14 -0700 Subject: [PATCH] fix in -> of issues --- validators/events.js | 2 +- validators/headerFields.js | 2 +- validators/nifti/duplicateFiles.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/validators/events.js b/validators/events.js index ca0d305ae..2640df0a9 100644 --- a/validators/events.js +++ b/validators/events.js @@ -21,7 +21,7 @@ const checkStimuli = function(stimuli) { const unusedStimuli = stimuliFromDirectory.filter(function(stimuli) { return stimuliFromEvents.indexOf(stimuli.relativePath) < 0 }) - for (let key in unusedStimuli) { + for (let key of unusedStimuli) { const stimulus = unusedStimuli[key] issues.push( new Issue({ diff --git a/validators/headerFields.js b/validators/headerFields.js index 2f1da3036..e3eb93387 100644 --- a/validators/headerFields.js +++ b/validators/headerFields.js @@ -37,7 +37,7 @@ var headerFields = function headerFields(headers) { for (file in allIssues39Dict) { var firstIssue = allIssues39Dict[file][0] var evidence = '' - for (var issue in allIssues39Dict[file]) { + for (var issue of allIssues39Dict[file]) { evidence = evidence + ' ' + allIssues39Dict[file][issue].reason } firstIssue.reason = evidence diff --git a/validators/nifti/duplicateFiles.js b/validators/nifti/duplicateFiles.js index d2074c35b..e5aecb8a8 100644 --- a/validators/nifti/duplicateFiles.js +++ b/validators/nifti/duplicateFiles.js @@ -15,11 +15,11 @@ const duplicateNiftis = files => { const duplicates = Object.keys(niftiCounts).filter(function(a) { return niftiCounts[a] > 1 }) - for (let key in duplicates) { + for (let key of duplicates) { const duplicateFiles = files.filter(function(a) { return a.name.split('.')[0] === duplicates[key] }) - for (let file in duplicateFiles) { + for (let file of duplicateFiles) { issues.push( new Issue({ code: 74,