Skip to content

Commit

Permalink
Use origin hostname instead of host
Browse files Browse the repository at this point in the history
`host` includes the port number, which can break links
Hopefully fixes #9
  • Loading branch information
cookpete committed Oct 23, 2017
1 parent 1628ed6 commit fd50a24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/templates/Default.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class Default {
listSpacing = '\n\n'

constructor (origin) {
this.origin = `https://${origin.host}/${origin.repo}`
this.origin = `https://${origin.hostname}/${origin.repo}`
}

render = (releases) => {
Expand Down
2 changes: 1 addition & 1 deletion test/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import changelogCompact from './data/changelog-compact'
import templates from '../src/templates'

const origin = {
host: 'github.com',
hostname: 'github.com',
repo: 'user/repo'
}

Expand Down

0 comments on commit fd50a24

Please sign in to comment.