-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Min(comparer) emits comparer result value instead of original stream value #1892
Labels
Comments
If you have fix for PR, welcome to have one. 👍 |
I'll work on one after vacation (2 weeks from now). |
gluck
added a commit
to gluck/RxJS
that referenced
this issue
Sep 6, 2016
min (&max) operators have now the expected behavior when used with a comparer: - previously they were behaving like _reduce_ and emitting (last) comparer return value - they now emit original observable min/max value by comparing the comparer return value to 0
gluck
added a commit
to gluck/RxJS
that referenced
this issue
Sep 7, 2016
max operator have now the expected behavior when used with a comparer: - previously was behaving like _reduce_ and emitting (last) comparer return value - now emits original observable max value by comparing the comparer return value to 0 - fixes ReactiveX#1892
gluck
added a commit
to gluck/RxJS
that referenced
this issue
Sep 7, 2016
min operator have now the expected behavior when used with a comparer: - previously was behaving like _reduce_ and emitting (last) comparer return value - now emits original observable min value by comparing the comparer return value to 0 - fixes ReactiveX#1892
gluck
added a commit
to gluck/RxJS
that referenced
this issue
Sep 7, 2016
max operator have now the expected behavior when used with a comparer: - previously was behaving like _reduce_ and emitting (last) comparer return value - now emits original observable max value by comparing the comparer return value to 0 - fixes ReactiveX#1892
gluck
added a commit
to gluck/RxJS
that referenced
this issue
Sep 7, 2016
min operator have now the expected behavior when used with a comparer: - previously was behaving like _reduce_ and emitting (last) comparer return value - now emits original observable min value by comparing the comparer return value to 0 - fixes ReactiveX#1892
gluck
added a commit
to gluck/RxJS
that referenced
this issue
Sep 8, 2016
min operator have now the expected behavior when used with a comparer: - previously was behaving like _reduce_ and emitting (last) comparer return value - now emits original observable min value by comparing the comparer return value to 0 - fixes ReactiveX#1892
kwonoj
added a commit
that referenced
this issue
Sep 9, 2016
fix(min/max): do not return comparer values (#1892)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
RxJS version:
5.0.0-beta.11
Code to reproduce:
Observable.range(1,2).min((a,b) => a > b ? -1 : a < b ? 1 : 0)
Expected behavior:
next(2)
(reverse comparer)Actual behavior:
next(1 | -1)
(the comparer result is emitted instead)Additional information:
existing rxjs 4 unit test showing expected behavior: min with comparer non-empty
existing rxjs 5 unit test showing the wrong behavior: should handle a constant predicate on observable with many values - 42 is emitted instead of some value from original observable.
I could work on a PR, but checking first that it's not an horrible mistake on my side, or an on-purpose change.
Thx.
The text was updated successfully, but these errors were encountered: