Skip to content

fix: avoid slicing header if not long enough #3862

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knocte
Copy link
Contributor

@knocte knocte commented Jan 20, 2024

Recent PR[1] didn't take in account very small subjects in subject-full-stop rule.

[1] #3839

Recent PR[1] didn't take in account very small subjects in
subject-full-stop rule.

[1] conventional-changelog#3839
@knocte knocte changed the title fix: avoid slicing input if not long enough fix: avoid slicing header if not long enough Jan 20, 2024
@escapedcat
Copy link
Member

Should this be tested?

@knocte
Copy link
Contributor Author

knocte commented Jan 27, 2024

Interestingly enough, I added a test for a short subject (2 characters) and it didn't fail! So I guess "12".slice(-3) might return empty string instead of throwing an exception?

@escapedcat
Copy link
Member

Also needs a rebase :P

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants