Skip to content

Commit 7a0943f

Browse files
authored
Fix: Throws error if tag does not contains "version" property (#272)
If any tag object does not contains "version" property it throws error. This patch fixes this issue
1 parent 8feafe8 commit 7a0943f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const getEndIndex = (tags, { unreleasedOnly, startingVersion, startingDate, tagP
5454
return index + 1
5555
}
5656
// Fall back to nearest version lower than startingVersion
57-
return tags.findIndex(({ version }) => semver.lt(version, semverStartingVersion))
57+
return tags.findIndex(({ version }) => version && semver.lt(version, semverStartingVersion))
5858
}
5959
if (startingDate) {
6060
return tags.filter(t => t.isoDate >= startingDate).length

0 commit comments

Comments
 (0)