Permalink
Browse files

build v0.11.0 pre-release

  • Loading branch information...
1 parent 553ab05 commit 344006c016ebdbd25420265266728964a02005a2 @derickbailey derickbailey committed Oct 5, 2012
@@ -303,14 +303,14 @@
addChildView: function(item, collection, options){
this.closeEmptyView();
var ItemView = this.getItemView(item);
- var index = (function get_index(options){
- if(options && options.index){
- return options.index;
- }
- else{
- return 0;
- }
- })(options);
+
+ var index;
+ if(options && options.index){
+ index = options.index;
+ } else {
+ index = 0;
+ }
+
return this.addItemView(item, ItemView, index);
},

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -287,14 +287,14 @@ Marionette.CollectionView = Marionette.View.extend({
addChildView: function(item, collection, options){
this.closeEmptyView();
var ItemView = this.getItemView(item);
- var index = (function get_index(options){
- if(options && options.index){
- return options.index;
- }
- else{
- return 0;
- }
- })(options);
+
+ var index;
+ if(options && options.index){
+ index = options.index;
+ } else {
+ index = 0;
+ }
+
return this.addItemView(item, ItemView, index);
},
Oops, something went wrong.

0 comments on commit 344006c

Please sign in to comment.