Permalink
Browse files

Pretty stupid bug

  • Loading branch information...
1 parent f662569 commit e5bb2f4d5b3bada0a2b88142adfeedcde8e2fdaa @MathieuLorber committed Oct 20, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 labs/architecture-examples/dart/todomvc/todomvc.dart
@@ -80,11 +80,8 @@ void updateCounts() {
});
checkAllCheckboxElement.checked = (complete == todoElements.length);
window.console.log('left : {$complete}');
- if(complete == 1) {
- countElement.innerHTML = '1 item left';
- } else {
- countElement.innerHTML = '${todoElements.length - complete} items left';
- }
+ int left = todoElements.length - complete;
+ countElement.innerHTML = '${left} item${left != 1 ? 's' : ''} left';
if(complete == 0) {
clearCompletedElement.style.display = 'none';
} else {

0 comments on commit e5bb2f4

Please sign in to comment.