Skip to content

Commit

Permalink
Merge pull request #204 from AY2223S1-CS2103T-W16-4/bug-ui-no-optional
Browse files Browse the repository at this point in the history
Fixed UI bug
  • Loading branch information
ThomasHoooo authored Oct 27, 2022
2 parents 14a9f48 + 4bb664f commit d4ef779
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/ui/ClientCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import javafx.scene.layout.HBox;
import javafx.scene.layout.Region;
import seedu.address.model.client.Client;
import seedu.address.model.client.Email;

/**
* An UI component that displays information of a {@code Client}.
Expand Down Expand Up @@ -45,7 +46,7 @@ public ClientCard(Client client, int displayedIndex) {
id.setText(displayedIndex + "");
name.setText(client.getName().fullName);
phone.setText(client.getPhone().value);
email.setText(client.getEmail().get().toString());
email.setText(client.getEmail().map(Email::toString).orElse(""));
String productStr = client.getProducts().toString();
products.setText(productStr.substring(1, productStr.length() - 1));
}
Expand Down

0 comments on commit d4ef779

Please sign in to comment.