Skip to content
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

Fix ReactAsyncIterables issue when formatting values directly into undefined/nulls #32

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

shtaif
Copy link
Owner

@shtaif shtaif commented Jan 6, 2025

When an ReactAsyncIterable is wrapping an underlying async iterable that itself yields any non-nullable values, but using a formatFn that formats directly into undefined or null - they'll be ignored and the underlying iterable's original yielding would actually be seen. The formatFn in such WAS invoked, however the internal logic would ignore its result and continue with the unformatted original value instead in case this result was undefined or null.

…s having the format function's result ignored if it returns `undefined` or `null`
@shtaif shtaif self-assigned this Jan 6, 2025
@shtaif shtaif marked this pull request as ready for review January 6, 2025 09:49
@shtaif shtaif merged commit 828d872 into master Jan 6, 2025
6 checks passed
@shtaif shtaif deleted the fix-iters-formatted-to-undefined-issue branch January 6, 2025 09:52
shtaif pushed a commit that referenced this pull request Jan 6, 2025
## [0.4.0](v0.3.0...v0.4.0) (2025-01-06)

### Features

* add to package exports the `IterationResultSet` type returned from `useAsyncIterMulti` ([#33](#33)) ([b0c8899](b0c8899))
* implement the new `useAsyncIterMulti` hook ([#28](#28)) ([d813fa0](d813fa0))

### Bug Fixes

* `ReactAsyncIterable`s wrapping iters which yield non-nullable values are having the format function's result ignored if it returned `undefined` or `null` ([#32](#32)) ([828d872](828d872))

### Documentation

* various docs edits ([#31](#31)) ([3f08461](3f08461))
Copy link

github-actions bot commented Jan 6, 2025

🎉 This PR is included in version 0.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

1 participant