Skip to content

Commit

Permalink
Merge pull request tastejs#637 from Roland1975/gh-pages
Browse files Browse the repository at this point in the history
refactor to reflect logic on line 62
  • Loading branch information
sindresorhus committed Jul 26, 2013
2 parents b299ed3 + f3a0719 commit 401846d
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ todomvc.controller('TodoCtrl', function TodoCtrl($scope, $location, todoStorage,
};

$scope.todoCompleted = function (todo) {
if (todo.completed) {
$scope.remainingCount--;
} else {
$scope.remainingCount++;
}
$scope.remainingCount += todo.completed ? -1 : 1;
todoStorage.put(todos);
};

Expand Down

0 comments on commit 401846d

Please sign in to comment.