Fix: Fail to render if parent was deleted
This commit is contained in:
@@ -4,7 +4,7 @@ class TaskRow extends AttractRowBase {
|
|||||||
constructor(task) {
|
constructor(task) {
|
||||||
super(task);
|
super(task);
|
||||||
this.parent = undefined;
|
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
|
// Deattach parent from task to avoid parent to be overwritten when task is updated
|
||||||
let parentId = task.parent._id;
|
let parentId = task.parent._id;
|
||||||
this.parent = task.parent;
|
this.parent = task.parent;
|
||||||
|
Reference in New Issue
Block a user