diff --git a/src/main/java/seedu/address/ui/DisplayListPanel.java b/src/main/java/seedu/address/ui/DisplayListPanel.java index a706542bc35..25a49a3c74f 100644 --- a/src/main/java/seedu/address/ui/DisplayListPanel.java +++ b/src/main/java/seedu/address/ui/DisplayListPanel.java @@ -49,7 +49,7 @@ public DisplayListPanel(Person person, CommandBox.CommandExecutor commandExecuto DisplayPerson displayPerson = new DisplayPerson(person); displayListView.setCellFactory(listView -> new DisplayListPanel.PersonListViewCell()); displayListView.setItems(displayPerson.getFieldDescriptions()); - descriptionTextArea.setText(person.getDescription().get().value); + descriptionTextArea.setText(person.getDescription().map(Object::toString).orElse("")); descriptionTextArea.textProperty().addListener((unused1, unused2, unused3) -> setStyleToDefault()); descriptionTextArea.setOnKeyPressed(event -> handleDescriptionEntered(event.getCode()));