diff --git a/lib/contributors/prompt.js b/lib/contributors/prompt.js index 07fb3cc..b91fe74 100644 --- a/lib/contributors/prompt.js +++ b/lib/contributors/prompt.js @@ -34,19 +34,19 @@ function getQuestions(options, username, contributions) { answers.username = answers.username || username; return options.contributors .filter((entry) => entry.login.toLowerCase() === answers.username.toLowerCase()) - .reduce((memo, entry) => memo.concat(entry.contributions), []); + .reduce((allEntries, entry) => allEntries.concat(entry.contributions), []); }, choices: contributionChoices(options), validate: function (input, answers) { answers.username = answers.username || username; var previousContributions = options.contributors .filter((entry) => entry.login.toLowerCase() === answers.username.toLowerCase()) - .reduce((memo, entry) => memo.concat(entry.contributions), []); + .reduce((allEntries, entry) => allEntries.concat(entry.contributions), []); if (!input.length) { - return 'Use space to select at least one contribution type.' + return 'Use space to select at least one contribution type.'; } else if (_.isEqual(input, previousContributions)) { - return 'Nothing changed, use space to select contribution types.' + return 'Nothing changed, use space to select contribution types.'; } return true; }