diff --git a/backbone.js b/backbone.js index ff7738f3..6bb95d9e 100644 --- a/backbone.js +++ b/backbone.js @@ -597,6 +597,7 @@ // Mix in each Underscore method as a proxy to `Model#attributes`. _.each(modelMethods, function(method) { + if (!_[method]) return; Model.prototype[method] = function() { var args = slice.call(arguments); args.unshift(this.attributes); @@ -978,6 +979,7 @@ // Mix in each Underscore method as a proxy to `Collection#models`. _.each(methods, function(method) { + if (!_[method]) return; Collection.prototype[method] = function() { var args = slice.call(arguments); args.unshift(this.models); @@ -990,6 +992,7 @@ // Use attributes instead of properties. _.each(attributeMethods, function(method) { + if (!_[method]) return; Collection.prototype[method] = function(value, context) { var iterator = _.isFunction(value) ? value : function(model) { return model.get(value);