Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix(incrementBase32): fix error message when unable to increment the input #106

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

Conversation

kt3k
Copy link

@kt3k kt3k commented Aug 4, 2023

Currently the below errors with Error: incorrectly encoded string:

const ULID = require('ulid')
ULID.incrementBase32('ZZZ')

However, the error message seems wrong here because ZZZ is correctly encoded base32 string. I think the error message should be cannot increment this string here. This PR fixes this issue by incrementing index counter before comparing with >=0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant