Skip to content

Commit

Permalink
fix(changelogs): guard for null and undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroenv committed Jan 25, 2018
1 parent ecfd9ea commit 0a0a748
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ function getChangelog({ repository }) {
return { changelogFilename: null };
}

const { user = '', project = '', host = '' } = repository;
const user = repository.user || '';
const project = repository.project || '';
const host = repository.host || '';
if (user.length < 1 || project.length < 1) {
return { changelogFilename: null };
}
Expand Down

0 comments on commit 0a0a748

Please sign in to comment.