diff --git a/main.js b/main.js index 80b010c7..e42f2abc 100644 --- a/main.js +++ b/main.js @@ -44,13 +44,9 @@ async function main() { } ] uniqueInputSets.forEach((inputSet) => { - const occurrences = Object.values(inputSet).reduce((occurrences, val) => { - if (val !== '') { - occurrences++ - } - return occurrences - },0) - if(occurrences > 1) { + const inputs = Object.values(inputSet) + const providedInputs = inputs.filter(input => input !== '') + if (providedInputs.length > 1) { throw new Error(`The following inputs cannot be used together: ${Object.keys(inputSet).join(", ")}`) } })