Skip to content

Commit b72640f

Browse files
committed
refactor: - Remove repetition of code in makeQueryContext()
1 parent e770f0b commit b72640f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/Scripting/QueryContext.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,10 @@ export interface QueryContext {
2828
* @param path
2929
*
3030
* @see SearchInfo.queryContext
31+
* @see makeQueryContextWithTasks
3132
*/
3233
export function makeQueryContext(path: string): QueryContext {
33-
const tasksFile = new TasksFile(path);
34-
return {
35-
query: {
36-
file: tasksFile,
37-
allTasks: [],
38-
},
39-
};
34+
return makeQueryContextWithTasks(path, []);
4035
}
4136

4237
export function makeQueryContextWithTasks(path: string, allTasks: Readonly<Task[]>): QueryContext {

0 commit comments

Comments
 (0)