From 130c0210058edb3d49f77d42e05ddbbb0a5770c2 Mon Sep 17 00:00:00 2001 From: 3y3k0 <3y3k0@yandex-team.ru> Date: Mon, 13 Feb 2023 06:27:43 +0300 Subject: [PATCH] fix(liquid): Add missed `contains` operator --- src/transform/liquid/evaluation.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/transform/liquid/evaluation.ts b/src/transform/liquid/evaluation.ts index fe3a0292..e6ed65b1 100644 --- a/src/transform/liquid/evaluation.ts +++ b/src/transform/liquid/evaluation.ts @@ -21,6 +21,7 @@ const operators: Record = { '<': ((l, r) => l !== null && r !== null && l < r) as NoFilter, '>=': ((l, r) => l !== null && r !== null && l >= r) as NoFilter, '<=': ((l, r) => l !== null && r !== null && l <= r) as NoFilter, + contains: ((l, r) => l !== null && r !== null && l.includes(r)) as NoFilter, and: ((l, r) => isTruthy(l) && isTruthy(r)) as NoFilter, or: ((l, r) => isTruthy(l) || isTruthy(r)) as NoFilter, '|': ((l, filter, exp) => {