From 8b176600b866b5d95626457affe3609384bd3454 Mon Sep 17 00:00:00 2001 From: Santi Albo Date: Mon, 12 Feb 2024 09:46:37 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Jun Yang --- src/render/operator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/operator.ts b/src/render/operator.ts index ebb24dae79..77ea07c108 100644 --- a/src/render/operator.ts +++ b/src/render/operator.ts @@ -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),