Closed gopikant21 closed 2 months ago
Is there an example of this actually being a problem? Not sure it's anything we need to worry about in practice.
Closing this PR because if the split command fails we want that error to bubble up as that would be an unexpected failure.
Hi, In the code, releaseNotes is being split by a regular expression, and the second part (index [1]) is being assigned back to releaseNotes. If the split operation does not result in at least two elements (meaning the regular expression did not match anything), releaseNotes will be undefined, and trying to call replace on it will throw the error.
Bug fixing: Check if releaseNotes is undefined after the split operation What if the releaseNotes and notes won't be split by a regular expression? What to return in this case?