working on test cases and dressing a bit of code

This commit is contained in:
bwhitn 2018-12-17 22:48:15 -05:00
parent 4fc37c4d02
commit f7b8e51764
3 changed files with 25 additions and 1 deletions

View file

@ -61,7 +61,7 @@ class ParseIMF extends Operation {
const dataObj = eml.extractData(fields);
let subject = null;
const retval = [];
if (dataObj.length >= 1) {
if (dataObj.length) {
subject = dataObj[0].fields.subject;
if (dataObj[0].header) {
retval.push(new File([dataObj[0].header], "Header.txt", {type: "text/plain"}));