Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed-undefined error #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

AkshadGawde
Copy link

added a check to ensure that release.body is defined before manipulating it further. This prevents the TypeError caused by trying to access properties or methods of undefined. If release.body is undefined, I included an error message to provide visibility into the issue.

@AkshadGawde AkshadGawde requested review from a team as code owners April 11, 2024 10:53
Copy link
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code won't work since parsed is needed on later lines but you've moved it's scope to be inside an if block.

Is there a known issue that you're trying to solve here (which release does this affect?) or is this change to protect against a potential issue?

@AkshadGawde
Copy link
Author

This code won't work since parsed is needed on later lines but you've moved it's scope to be inside an if block.

Is there a known issue that you're trying to solve here (which release does this affect?) or is this change to protect against a potential issue?

Thanks for pointing that out! The change was made to prevent potential 'TypeError' exceptions when 'release.body' is undefined, but it unintentionally affected the scope of the parsed variable. I'll adjust the code to ensure parsed remains in scope for later use while maintaining error handling. Appreciate the guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants