Skip to content

Commit

Permalink
Fix reduce callback
Browse files Browse the repository at this point in the history
  • Loading branch information
M1kep committed May 31, 2022
1 parent 660601a commit 46e94b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.js
Expand Up @@ -46,8 +46,9 @@ async function main() {
uniqueInputSets.forEach((inputSet) => {
const occurrences = Object.values(inputSet).reduce((occurrences, val) => {
if (val !== '') {
return occurrences++
occurrences++
}
return occurrences
},0)
if(occurrences > 1) {
throw new Error(`The following inputs cannot be used together: ${Object.keys(inputSet).join(", ")}`)
Expand Down

0 comments on commit 46e94b8

Please sign in to comment.