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

fix: Rely on equal for computing contains #668

Merged
merged 2 commits into from
Feb 14, 2024
Merged

Conversation

santialbo
Copy link
Contributor

This change allows the contains to be computed using the toValue of the items in the array.

Before this change if I had an array of "Drop" contains would not match against the value.

this is not valid liquid, this is just to explain the case i'm trying to fix

{{[Drop("hello"), Drop("bye")] | contains "hello"}} -> false

with the changes on this pr, it will return true.

@santialbo santialbo force-pushed the patch-3 branch 3 times, most recently from 5c16a4a to bb9f432 Compare February 8, 2024 16:17
This change allows contains to be computed using the toValue of the items in the array.
Before this change if I had an array of "Drop" `contains` would not match against the value.
src/render/operator.ts Outdated Show resolved Hide resolved
src/render/operator.ts Outdated Show resolved Hide resolved
@harttle harttle changed the title Rely on equal for computing contains fix: Rely on equal for computing contains Feb 10, 2024
Co-authored-by: Jun Yang <harttleharttle@gmail.com>
@harttle harttle merged commit 1937aa1 into harttle:master Feb 14, 2024
11 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 18, 2024
## [10.10.1](v10.10.0...v10.10.1) (2024-02-18)

### Bug Fixes

* in conditionals, don't render anything after an else branch ([#671](#671)) ([f816955](f816955))
* Rely on equal for computing contains ([#668](#668)) ([1937aa1](1937aa1))
Copy link

🎉 This PR is included in version 10.10.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants