summaryrefslogtreecommitdiff
path: root/src/eval/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/index.ts')
-rw-r--r--src/eval/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval/index.ts b/src/eval/index.ts
index 3912031..276f686 100644
--- a/src/eval/index.ts
+++ b/src/eval/index.ts
@@ -77,7 +77,7 @@ const checkExpr = <T>(
PropertyMatch: ({ name, exprs }) =>
pipe(
- Object.prototype.hasOwnProperty.call(item, name)
+ Object.prototype.hasOwnProperty.call(item ?? {}, name)
? checkExpr(Expr.Group({ exprs }), item[name], list, index)
: [],
res => (res.length > 0 ? [group(item, index)] : []), // FIXME: doesn't allow nested matching