Permalink
Browse files

Merge pull request #13 from moviepilot/hotfix-sort-compare

Fixes a bug that was causing any collection 'sorting' to start at the wr...
  • Loading branch information...
2 parents 4422a69 + 247ecab commit 1dad18c38cf973e6ac99e901f4e2f6c2b0c3f8ad @molily molily committed Mar 23, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 coffee/views/collection_view.coffee
  2. +1 −1 js/views/collection_view.js
@@ -88,7 +88,7 @@ define ['lib/utils', 'views/view'], (utils, View) ->
# When an item is added, create a new view and insert it
itemAdded: (item, collection, options = {}) =>
#console.debug 'CollectionView#itemAdded', this, item.cid, item
- @renderAndInsertItem item, options.at
+ @renderAndInsertItem item, options.index
# When an item is removed, remove the corresponding view from DOM and caches
itemRemoved: (item) =>
@@ -76,7 +76,7 @@ define(['lib/utils', 'views/view'], function(utils, View) {
CollectionView.prototype.itemAdded = function(item, collection, options) {
if (options == null) options = {};
- return this.renderAndInsertItem(item, options.at);
+ return this.renderAndInsertItem(item, options.index);
};
CollectionView.prototype.itemRemoved = function(item) {

0 comments on commit 1dad18c

Please sign in to comment.