Skip to content

Commit 92939fd

Browse files
committed
Fix saveTasksToFileIfNeeded condition in Task class
1 parent bf48647 commit 92939fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/task.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export class Task {
247247
try {
248248
const tasks = await this.retrieveTasksByCategoryPosition(position);
249249
this.updateTaskCategoryList(position, tasks);
250-
await this.saveTasksToFileIfNeeded(tasks.length > 0);
250+
await this.saveTasksToFileIfNeeded(tasks?.length > 0);
251251
return tasks;
252252
} catch (error) {
253253
console.error("Error getting tasks by category position:", (error as Error).message);

0 commit comments

Comments
 (0)