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

Immutable reverse filter on arrays #126

Closed
jeremenichelli opened this issue May 17, 2019 · 2 comments
Closed

Immutable reverse filter on arrays #126

jeremenichelli opened this issue May 17, 2019 · 2 comments
Labels

Comments

@jeremenichelli
Copy link

Hi there 👋

This is an issue/question, shouldn't filters be oure functions? Meaning that when they are applied they don't mutate original context data pass to the partial or template.

Here's a reduced case: https://jsfiddle.net/4kq2e6fx/

A collection is assigned to a variable and reversed, twice. This should produce the same outcome (?) but it isn't so it's reversing the original data on every pass.

harttle added a commit that referenced this issue May 19, 2019
harttle pushed a commit that referenced this issue May 19, 2019
## [8.2.3](v8.2.2...v8.2.3) (2019-05-19)

### Bug Fixes

* reverse filter not pure, see [#126](#126) ([505c408](505c408))
@harttle harttle added the bug label May 19, 2019
@jeremenichelli
Copy link
Author

I saw your release @harttle, does that mean this can be closed?

I wanna first say thank you for how immediate the response to the issue was. I feel bad for not making a PR for it. I actually forked and opened a branch (and went the same way using spread) but couldn't manage to get the test case passing, sorry for that 🙏

If there's any patreon, collective or anny way I can do a small donation to thank you for your work on this let me know. Thanks again!

@harttle
Copy link
Owner

harttle commented May 22, 2019

I'll consider that, thank you :)

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

No branches or pull requests

2 participants