diff --git a/examples/todomvc/todomvc.js b/examples/todomvc/todomvc.js index 83d2a822..5d842258 100644 --- a/examples/todomvc/todomvc.js +++ b/examples/todomvc/todomvc.js @@ -62,7 +62,7 @@ var state = { //view var Todos = { add: function(e) { - if (e.keyCode === 13) { + if (e.keyCode === 13 && e.target.value) { state.dispatch("createTodo", [e.target.value]) e.target.value = "" }