mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
fix: where-filter null handling (#457)
This commit is contained in:
@@ -183,6 +183,18 @@ describe('filters/array', function () {
|
||||
- Boring sneakers
|
||||
`)
|
||||
})
|
||||
it('should support filter by null property', function () {
|
||||
return test(`{% assign untyped_products = products | where: "type", null %}
|
||||
Untyped products:
|
||||
{% for product in untyped_products -%}
|
||||
- {{ product.title }}
|
||||
{% endfor %}`, { products }, `
|
||||
Untyped products:
|
||||
- Coffee mug
|
||||
- Limited edition sneakers
|
||||
- Boring sneakers
|
||||
`)
|
||||
})
|
||||
it('should support nested property', async function () {
|
||||
const authors = [
|
||||
{ name: 'Alice', books: { year: 2019 } },
|
||||
|
||||
Reference in New Issue
Block a user