Fix some bugs

This commit is contained in:
Steve Kinney
2024-09-17 15:50:09 -06:00
parent 4971bda81b
commit e29c63f5cb
6 changed files with 105 additions and 64 deletions

View File

@@ -47,7 +47,13 @@ export const updateTask = (id, updates) => {
if (!task) return undefined;
Object.assign(task, updates, { lastModified: new Date() });
for (const key in updates) {
if (updates[key] !== undefined) {
task[key] = updates[key];
}
}
Object.assign(task, { lastModified: new Date() });
return task;
};