Skip to content

Commit

Permalink
Allow Collection to receive falsy comparator to override default
Browse files Browse the repository at this point in the history
  • Loading branch information
caseywebdev committed May 23, 2012
1 parent 7bea8ee commit 6d21c05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down

0 comments on commit 6d21c05

Please sign in to comment.