Skip to content

Conversation

@chrisguttandin
Copy link
Contributor

Description:

This PR makes sure the error reported here (#6716) doesn't get thrown anymore.

BREAKING CHANGE: There are no breaking changes.

Related issue (if exists): #6716

I've added a test case which covers the bug but I wasn't sure if there might be a better way to test this. Please let me know if I need to change anything.

// then we complete the result. This is because we cannot possibly have
// any more values to zip together.
if (buffers.some((buffer, i) => !buffer.length && completed[i])) {
if (buffers !== null && buffers.some((buffer, i) => !buffer.length && completed[i])) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
if (buffers !== null && buffers.some((buffer, i) => !buffer.length && completed[i])) {
if (buffers?.some((buffer, i) => !buffer.length && completed[i])) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I initially thought using an explicit !== null check is better as it results in a boolean which some people (including myself :-)) prefer. But I think your suggestion is more in line with the existing RxJS codebase.

I've changed it. Thanks for the review.

@chrisguttandin
Copy link
Contributor Author

Sorry for tagging you @benlesh. I know it sucks. But given that this PR already had it's first anniversary and I rebased it a couple of times I hope it's okay. I would really appreciate if you could take a look. The PR only adds a single character and a test.

Many thanks in advance.

@truebden
Copy link

truebden commented Jul 2, 2024

I just faced this issue in my code too and it would be great to have the PR merged 😉

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.

3 participants