- fix undefined for match regex
- FIX https://github.com/mikepenz/release-changelog-builder-action/issues/965
This commit is contained in:
+1
-1
@@ -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 {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user