Skip to content

Commit

Permalink
fix: any rule not accounting for empty filter (#4051)
Browse files Browse the repository at this point in the history
* fix: any rule not accounting for empty filter

* chore: add changelog
  • Loading branch information
douugdev authored Jan 8, 2025
1 parent cc1c11a commit 3fbe6d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/loot-core/src/server/aql/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ function compileConditions(state, conds) {
}
return compileAnd(state, cond);
} else if (field === '$or') {
if (!cond) {
if (!cond || (Array.isArray(cond) && cond.length === 0)) {
return null;
}
return compileOr(state, cond);
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/4051.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [douugdev]
---

Fixing report crash when filters have an "any" clause selected and all conditions are deleted.

0 comments on commit 3fbe6d0

Please sign in to comment.