From 46e94b82fc6e06c4fec73859f593683115332280 Mon Sep 17 00:00:00 2001 From: Michael Poutre Date: Tue, 31 May 2022 12:57:29 -0700 Subject: [PATCH] Fix reduce callback --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 5cdc8f12..80b010c7 100644 --- a/main.js +++ b/main.js @@ -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(", ")}`)