Fixed bug: Last entries get lost.
This commit is contained in:
parent
83dcb3cdf9
commit
014da21bf5
|
@ -97,6 +97,8 @@ module GitHubChangelogGenerator
|
||||||
def ensure_older_tag(older_tag, newer_tag)
|
def ensure_older_tag(older_tag, newer_tag)
|
||||||
return older_tag if older_tag
|
return older_tag if older_tag
|
||||||
idx = sorted_tags.index { |t| t["name"] == newer_tag["name"] }
|
idx = sorted_tags.index { |t| t["name"] == newer_tag["name"] }
|
||||||
|
# skip if we are already at the oldest element
|
||||||
|
return if idx == sorted_tags.size - 1
|
||||||
sorted_tags[idx - 1]
|
sorted_tags[idx - 1]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user