Before if there was no this.task[id] a new task was created but this.task[id] was not updated so subsequent calls would return a new object instead of the first created one.