Skip to content

Commit

Permalink
Added check for advanced options which have not been set
Browse files Browse the repository at this point in the history
  • Loading branch information
Allcharles committed Mar 29, 2019
1 parent e20eeb1 commit c477519
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/js/analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,19 @@ class Audio2CSVAnalysis extends APAnalysis {
//For each input, add AnalysisOption
item.value.split(":").map(option => {
let input = form.querySelector(`#${checkbox[0]}-input${option}`);
finalOptions.push(new AnalysisOption(option, input.value));

//If value is empty, skip adding it to analysis option
if (input.value !== "") {
finalOptions.push(new AnalysisOption(option, input.value));
}
});
} else {
let input = form.querySelector(`#${checkbox[0]}-input`);
finalOptions.push(new AnalysisOption(item.value, input.value));

//If value is empty, skip adding it to analysis option
if (input.value !== "") {
finalOptions.push(new AnalysisOption(item.value, input.value));
}
}
}
});
Expand Down

0 comments on commit c477519

Please sign in to comment.