Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 4504162

Browse files
committed
filters fixed
1 parent 7a277db commit 4504162

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/services/DataviewService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ class DataviewProxy {
4646
if (p[c.field] > c.value) return false;
4747
break;
4848
case OperatorFilter.CONTAINS:
49-
if (!p[c.field].includes(c.value)) return false;
49+
if (p[c.field] !== undefined && !p[c.field].includes(c.value)) return false;
5050
break;
5151
case OperatorFilter.STARTS_WITH:
52-
if (!p[c.field].startsWith(c.value)) return false;
52+
if (p[c.field] !== undefined && !p[c.field].startsWith(c.value)) return false;
5353
break;
5454
case OperatorFilter.ENDS_WITH:
55-
if (!p[c.field].endsWith(c.value)) return false;
55+
if (p[c.field] !== undefined && !p[c.field].endsWith(c.value)) return false;
5656
break;
5757
default:
5858
throw new Error(`Unknown operator: ${c.operator}`);

0 commit comments

Comments
 (0)