mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-30 03:00:06 -04:00
Merge pull request #1342 from caseywebdev/master
Allow Collection to receive falsy `comparator` to override default
This commit is contained in:
@@ -548,7 +548,7 @@
|
||||
var Collection = Backbone.Collection = function(models, options) {
|
||||
options || (options = {});
|
||||
if (options.model) this.model = options.model;
|
||||
if (options.comparator) this.comparator = options.comparator;
|
||||
if (options.comparator !== undefined) this.comparator = options.comparator;
|
||||
this._reset();
|
||||
this.initialize.apply(this, arguments);
|
||||
if (models) this.reset(models, {silent: true, parse: options.parse});
|
||||
|
||||
Reference in New Issue
Block a user