From e0f70d813c58a0f95af9a183c1e517e954e36e9a Mon Sep 17 00:00:00 2001 From: Chris Filo Gorgolewski Date: Sun, 11 Mar 2018 15:07:38 -0700 Subject: [PATCH] better handling of missing headers --- validators/tsv.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/validators/tsv.js b/validators/tsv.js index fb2c81582..e8690e3ce 100644 --- a/validators/tsv.js +++ b/validators/tsv.js @@ -81,16 +81,14 @@ var TSV = function TSV (file, contents, fileList, callback) { file: file, evidence: headers, line: 1, - character: rows[0].indexOf(headers[0]), code: 20 })); } - if ((headers.length <= 1) || (headers[1].trim() !== "duration")){ + if ((headers.length == 1) || (headers[1].trim() !== "duration")){ issues.push(new Issue({ file: file, evidence: headers, line: 1, - character: rows[0].indexOf(headers[1]), code: 21 })); }