I’ve followed every step of the tutorial to the letter yet I’m getting this error attempting to set a task to be private:
TypeError: Cannot read property ‘_id’ of undefined
at TodosListCtrl.setPrivate (app.js:126)
at fn (eval at compile (modules.js:15526), :4:370)
at expensiveCheckFn (modules.js:16615)
at callback (modules.js:26594)
at Scope.$eval (modules.js:18391)
at Scope.$apply (modules.js:18491)
at HTMLButtonElement. (modules.js:26599)
at HTMLButtonElement.dispatch (jquery.js:4723)
at HTMLButtonElement.elemData.handle (jquery.js:4391)
The line with the problem looks like this:
setPrivate(task) {
Meteor.call(‘tasks.setPrivate’, task._id, !task.private);
}
but every other call doesn’t have a problem with task._id