- fix undefined for match regex

- FIX https://github.com/mikepenz/release-changelog-builder-action/issues/965
This commit is contained in:
Mike Penz
2022-12-09 12:46:07 +00:00
committed by GitHub
parent 309a123e6e
commit 7885e80a58
3 changed files with 3 additions and 3 deletions
Generated Vendored
+1 -1
View File
@@ -1890,7 +1890,7 @@ function extractValuesFromString(value, extractor) {
if (extractor.method === 'match') {
const lables = value.match(extractor.pattern);
if (lables !== null && lables.length > 0) {
return lables.map(label => label.toLocaleLowerCase('en'));
return lables.map(label => (label === null || label === void 0 ? void 0 : label.toLocaleLowerCase('en')) || '');
}
}
else {
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -483,7 +483,7 @@ function extractValuesFromString(value: string, extractor: RegexTransformer): st
if (extractor.method === 'match') {
const lables = value.match(extractor.pattern)
if (lables !== null && lables.length > 0) {
return lables.map(label => label.toLocaleLowerCase('en'))
return lables.map(label => label?.toLocaleLowerCase('en') || '')
}
} else {
const label = value.replace(extractor.pattern, extractor.target)