From 2b1eae4d9c50a77a252fdcfbaa4e8aefa66df8fc Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Thu, 26 May 2011 13:54:22 -0400 Subject: [PATCH] Issue #365. delete options.comparator. --- backbone.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backbone.js b/backbone.js index 5cef2cec..bef05473 100644 --- a/backbone.js +++ b/backbone.js @@ -410,10 +410,7 @@ // its models in sort order, as they're added and removed. Backbone.Collection = function(models, options) { options || (options = {}); - if (options.comparator) { - this.comparator = options.comparator; - delete options.comparator; - } + if (options.comparator) this.comparator = options.comparator; _.bindAll(this, '_onModelEvent', '_removeReference'); this._reset(); if (models) this.reset(models, {silent: true});