Skip to content

Commit

Permalink
refactor: Simplify Query.applyQueryToTasks()
Browse files Browse the repository at this point in the history
  • Loading branch information
claremacrae committed Oct 27, 2023
1 parent b2ed2dd commit f1ec05f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Query/Query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ Problem line: "${line}"`;
}

public applyQueryToTasks(tasks: Task[]): QueryResult {
const allTasks = tasks;
const searchInfo = new SearchInfo(tasks);
try {
this.filters.forEach((filter) => {
tasks = tasks.filter((task) => filter.filterFunction(task, new SearchInfo(allTasks)));
tasks = tasks.filter((task) => filter.filterFunction(task, searchInfo));
});

const { debugSettings } = getSettings();
Expand Down

0 comments on commit f1ec05f

Please sign in to comment.