Skip to content

Commit

Permalink
(flight) fix clearCompleted bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus committed Jun 29, 2013
1 parent 757d0fc commit cceaffa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions dependency-examples/flight/app/js/data/todos.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ define([
};

this.clearCompleted = function () {
var todos;

dataStore.destroyAll({ completed: true });
todos = dataStore.all();
this.trigger('dataClearedCompleted', { todos: todos });

this.trigger('uiFilterRequested', { filter: filter });
this.trigger('dataClearedCompleted');
};

this.after('initialize', function () {
Expand Down
1 change: 0 additions & 1 deletion dependency-examples/flight/app/js/ui/todo_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ define([
this.on(document, 'dataTodoAdded', this.render);
this.on(document, 'dataTodosLoaded', this.renderAll);
this.on(document, 'dataTodosFiltered', this.renderAll);
this.on(document, 'dataClearedCompleted', this.renderAll);
this.on(document, 'dataTodoToggledAll', this.renderAll);
this.on(document, 'dataTodoRemoved', this.remove);

Expand Down

0 comments on commit cceaffa

Please sign in to comment.