harttle / liquidjs

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

contains operator does not support Drop's valueOf #492

Closed maiyuanrdt closed 2 years ago

maiyuanrdt commented 2 years ago

When the contains operator operates on a Drop object, it cannot operate on the valueOf value. for example:

class TemplateDrop extends Drop {
    constructor() {
    }

    valueOf() {
        return “product”
    }
}

{% if template contains "product" %}XXXX{%endif%}

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 9.36.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: