Skip to content

Commit

Permalink
Handle empty input
Browse files Browse the repository at this point in the history
  • Loading branch information
SSirMentos committed Sep 19, 2024
1 parent 990bb7d commit 5992cda
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/Mentos/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public void setDuke(Mentos d) {
@FXML
private void handleUserInput() {
String input = userInput.getText();
if (input.equals("")) {
return;
}
String response = duke.getResponse(input);
dialogContainer.getChildren().addAll(
DialogBox.getUserDialog(input, userImage),
Expand Down

0 comments on commit 5992cda

Please sign in to comment.