Skip to content

Commit

Permalink
fix(parse): nested values optional chain
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Oct 13, 2022
1 parent 416bcf2 commit a9147eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ const semverBump = (

Object.entries(parsedCommits).forEach(([key, { commits = [] }]) => {
switch (key) {
case commitType.feat.value:
case commitType.revert.value:
case commitType?.feat?.value:
case commitType?.['revert']?.value:
weight += 10 * commits.length;
break;
case commitType.refactor.value:
case commitType?.refactor?.value:
weight += commits.length;
break;
default:
Expand Down

0 comments on commit a9147eb

Please sign in to comment.