Skip to content

Commit a88f941

Browse files
committed
Prevent adding empty entries to EntryInputContainer
1 parent 5adab7e commit a88f941

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

App/containers/EntryInputContainer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ export default class EntryInputContainer extends Component {
2626

2727
handleAdd(event) {
2828
event.preventDefault();
29+
30+
if (this.state.value === '') {
31+
return;
32+
}
33+
2934
this.props.actionAddEntryToState(this.state.value);
3035
this.setState({
3136
value: '',

0 commit comments

Comments
 (0)