fix: Project removal in edit modal not saving changes (#213)

- Fix projects change detection when removing all projects
- Set projects to empty array instead of undefined for proper comparison
- Ensures project removals are correctly saved to file
This commit is contained in:
Callum Alpass 2025-07-27 12:53:57 +10:00
parent b38b7e3305
commit d21a566e4f

View file

@ -416,7 +416,7 @@ export class TaskEditModal extends TaskModal {
const oldProjects = this.task.projects || [];
if (JSON.stringify(newProjects.sort()) !== JSON.stringify(oldProjects.sort())) {
changes.projects = newProjects.length > 0 ? newProjects : undefined;
changes.projects = newProjects;
}
// Parse and compare tags