Skip to content

Commit

Permalink
fix: ensure header is set
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed May 3, 2019
1 parent f7027f1 commit b2c01bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ export async function whatBroke(
for (let v in parsed) {
if (v === version) {
const { header, body } = parsed[v]
release.header = header
release.body = body
if (header) release.header = header
if (body) release.body = body
break
}
}
} catch (error) {
const changelog = await getChangelog(owner, repo)
const { header, body } = changelog[version] || {}
release.header = header
if (header) release.header = header
release.body = body
}
if (!release.body) {
Expand Down

0 comments on commit b2c01bf

Please sign in to comment.