fix(todo): fix #7 adding empty todo item issue

This commit is contained in:
nixa 2016-06-02 23:44:28 +03:00
parent a1046ce2b4
commit c276c5535a

View file

@ -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,