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: allow feed index to be 0 when downloading #897

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

ottpeter
Copy link
Contributor

Currently, if one tries to download index 0, like so:

await ourReader.download({ index: 0 });

instead of downloading index 0, it will download the last index, because 0 is falsy value in JavaScript. I think we need to check if the index is 0, because in that case, we shouldn't go into the if-condition.

@Cafe137 Cafe137 changed the title Changes condition, so FeedUpdateOptions.index can be 0 fix: allow feed index to be 0 when downloading Jan 17, 2024
@Cafe137 Cafe137 merged commit 5440c81 into ethersphere:master Jan 17, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants