You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since our interface strictly requires param, it's more like an edge case. If I were to amend behavior, I'd rather throw argumentRangeError as same as non-acceptable count param instead of implicitly fallback to other behavior.
Bug Report
Current Behavior
takeLast() operator when applied without any param returns undefined.
Reproduction
https://codepen.io/kievsash/pen/dEgyGX?editors=0010
Expected behavior
WEll, should be discussed I guess. I propose that takeLast() to work like takeLast(1) -
Environment
Possible Solution
To set count=1 by default here: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/takeLast.ts#L50
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: