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: empty shallowSlice return #65

Merged
merged 1 commit into from Feb 3, 2019

Conversation

reconbot
Copy link
Contributor

@reconbot reconbot commented Feb 2, 2019

Buffer.slice() and BL.slice() both support returning an empty dataset when start and end are the same. We were defaulting the end argument assuming we’d always have a truthy value for end, when 0 is a valid value.

The current behavior of .shallowSlice(0,0) is to return the whole buffer list, this changes it to an empty buffer list.

Buffer.slice() and BL.slice() both support returning an empty dataset when start and end are both the same. We were defaulting the end arg assuming we’d always have a truthy value for end, when 0 is valid.
Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

None yet

2 participants