electron / release-status

Public facing release status information
https://releases.electronjs.org
MIT License
3 stars 8 forks source link

Gopi kant type error cannot read properties of undefined (reading 'replace') #58

Closed gopikant21 closed 2 months ago

gopikant21 commented 2 months ago

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?

dsanders11 commented 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.

jkleinsc commented 2 months ago

Closing this PR because if the split command fails we want that error to bubble up as that would be an unexpected failure.