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

Observable Collection Reduce Improper Parameters #2

Closed
Andrei15193 opened this issue Jun 20, 2022 · 0 comments
Closed

Observable Collection Reduce Improper Parameters #2

Andrei15193 opened this issue Jun 20, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Andrei15193
Copy link
Owner

The reduce method on observable collection receives improper parameters when executing the callback.

The following code sample exposes the bug:

const observableCollection = new ObservableCollection<string>();
observableCollection.push("one", "two");
observableCollection
    .reduce(
        (result, item, index, collection) => {
            // result is actually the item
            // item is actually the item index
            // index is actually the observable collection
            // collection is undefined
            // The result array is actually provided through the callback context
        },
        []
    );
@Andrei15193 Andrei15193 added the bug Something isn't working label Jun 20, 2022
@Andrei15193 Andrei15193 self-assigned this Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant