mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-08 03:00:26 -04:00
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 (typeof 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