Skip to content

Commit

Permalink
Fix: Throws error if tag does not contains "version" property (#272)
Browse files Browse the repository at this point in the history
If any tag object does not contains "version" property it throws error. This patch fixes this issue
  • Loading branch information
erayhanoglu authored Sep 11, 2024
1 parent 8feafe8 commit 7a0943f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const getEndIndex = (tags, { unreleasedOnly, startingVersion, startingDate, tagP
return index + 1
}
// Fall back to nearest version lower than startingVersion
return tags.findIndex(({ version }) => semver.lt(version, semverStartingVersion))
return tags.findIndex(({ version }) => version && semver.lt(version, semverStartingVersion))
}
if (startingDate) {
return tags.filter(t => t.isoDate >= startingDate).length
Expand Down

0 comments on commit 7a0943f

Please # to comment.