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

fix: Add optional to type chain #560

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ async function getPRAndMilestoneFromCommit(
hash.slice(1),
pr
? {
author: pr.author.login,
author: pr.author?.login ?? null,
Copy link
Member

Choose a reason for hiding this comment

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

I don't think ?? null is needed here with the ?. access (since that'll become undefined already) -- I think this also needs a fix to the types above because as it is right now the ?. looks unnecessary (I'm surprised the type checker isn't complaining about this?)

pr: pr.number,
prBody: pr.body,
milestone: pr.milestone?.number ?? null,
Expand Down
Loading