harttle / liquidjs

A simple, expressive, safe and Shopify compatible template engine in pure JavaScript.
https://liquidjs.com
MIT License
1.5k stars 237 forks source link

fix: Rely on equal for computing contains #668

Closed santialbo closed 6 months ago

santialbo commented 7 months ago

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.

github-actions[bot] commented 6 months ago

:tada: This PR is included in version 10.10.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: