Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jun Yang <[email protected]>
  • Loading branch information
santialbo and harttle authored Feb 12, 2024
1 parent 7eb5754 commit 8b17660
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/render/operator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const defaultOperators: Operators = {
},
'contains': (l: any, r: any) => {
l = toValue(l)
if (l && isArray(l)) return l.some((i) => equal(i, r))
if (l && isString(l)) return l.indexOf(toValue(r)) > -1
if (isArray(l)) return l.some((i) => equal(i, r))
if (isString(l)) return l.indexOf(toValue(r)) > -1
return false
},
'not': (v: any, ctx: Context) => isFalsy(toValue(v), ctx),
Expand Down

0 comments on commit 8b17660

Please sign in to comment.