Commit cceaffa8 authored by Stephen Sawchuk's avatar Stephen Sawchuk

(flight) fix clearCompleted bug.

parent 757d0fca
......@@ -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 () {
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment