Fix: Fail to render if parent was deleted

This commit is contained in:
2019-04-02 14:09:20 +02:00
parent 23e0e55de9
commit f1354b9837

View File

@@ -4,7 +4,7 @@ class TaskRow extends AttractRowBase {
constructor(task) {
super(task);
this.parent = undefined;
if (typeof task.parent === 'object') {
if (task.parent && task.parent._id) {
// Deattach parent from task to avoid parent to be overwritten when task is updated
let parentId = task.parent._id;
this.parent = task.parent;