diff --git a/src/App.js b/src/App.js index 887c060..1bd3ce0 100644 --- a/src/App.js +++ b/src/App.js @@ -70,6 +70,10 @@ class App extends React.Component { addTask(e) { e.preventDefault() + if (this.state.newTask === '') { + console.log('Not adding empty task.') + return + } this.setState({ tasks: this.state.tasks.concat({ id: this.state.tasks.length,