added check for empty `INPUT_RC-WORDING`

added check for empty `INPUT_RC-WORDING`
`const preReleaseWords = process.env['INPUT_RC-WORDING'] ? process.env['INPUT_RC-WORDING'].split(',') : [];`
This commit is contained in:
Phil 2021-11-21 19:01:24 +01:00 committed by GitHub
parent 1405cf24a9
commit 73ae0d45d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ const workspace = process.env.GITHUB_WORKSPACE;
const minorWords = process.env['INPUT_MINOR-WORDING'].split(',');
// patch is by default empty, and '' would always be true in the includes(''), thats why we handle it separately
const patchWords = process.env['INPUT_PATCH-WORDING'] ? process.env['INPUT_PATCH-WORDING'].split(',') : null;
const preReleaseWords = process.env['INPUT_RC-WORDING'].split(',');
const preReleaseWords = process.env['INPUT_RC-WORDING'] ? process.env['INPUT_RC-WORDING'].split(',') : [];
console.log('config words:', { majorWords, minorWords, patchWords, preReleaseWords });