Skip to content

Commit

Permalink
fix(liquid): Add missed contains operator
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3k0 authored and moki committed Feb 13, 2023
1 parent 0e97260 commit 130c021
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/transform/liquid/evaluation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const operators: Record<string, WithFilter | NoFilter | DotOperator> = {
'<': ((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) => {
Expand Down

0 comments on commit 130c021

Please sign in to comment.