Skip to content

Commit

Permalink
fix(todo): fix #7 adding empty todo item issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nnixaa committed Jun 2, 2016
1 parent a1046ce commit c276c55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/pages/dashboard/todo/todo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class Todo {

addToDoItem($event) {

if ($event.which === 1 || $event.which === 13) {
if (($event.which === 1 || $event.which === 13) && this.newTodoText.trim() != '') {

this.todoList.unshift({
text: this.newTodoText,
Expand Down

0 comments on commit c276c55

Please sign in to comment.