Skip to content

Commit

Permalink
Fixed minor bug in examples/todos/todos.js
Browse files Browse the repository at this point in the history
AppView.addOne was being called with incorrect context from addAll.
The method still worked, since window.$("#todo-list") returns the correct element, 
but it may be confusing for people learning backbone.js.
  • Loading branch information
Cole committed Jan 14, 2013
1 parent 00540d9 commit 07b8f0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/todos/todos.js
Expand Up @@ -211,7 +211,7 @@ $(function(){

// Add all items in the **Todos** collection at once.
addAll: function() {
Todos.each(this.addOne);
Todos.each(this.addOne, this);
},

// If you hit return in the main input field, create new **Todo** model,
Expand Down

0 comments on commit 07b8f0c

Please sign in to comment.