Uncaught TypeError: Cannot read property 'update' of undefined #2094
Closed
Description
Open todos/index.html in chrome (current version), you will get this error. It prevents you from being able to add items to the list.
backbone.js line 812
// Fetch the default set of models for this collection, resetting the
// collection when they arrive. If `update: true` is passed, the response
// data will be passed through the `update` method instead of `reset`.
fetch: function(options) {
options = options ? _.clone(options) : {};
if (options.parse === void 0) options.parse = true;
var success = options.success;
options.success = function(collection, resp, options) {
var method = options.update ? 'update' : 'reset';
Uncaught TypeError: Cannot read property 'update' of undefined
collection[method](resp, options);
if (success) success(collection, resp, options);
};
return this.sync('read', this, options);
},