Skip to content

Commit

Permalink
Merge pull request #161 from xGladiate/add-command-display-issues
Browse files Browse the repository at this point in the history
Modify code to make tags optional during display for add command
  • Loading branch information
xGladiate authored Nov 1, 2024
2 parents aa063f5 + bfa42be commit bc495c9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/seedu/address/logic/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ public static String format(Person person) {
.append("; Email: ")
.append(person.getEmail())
.append("; Address: ")
.append(person.getAddress())
.append("; Tags: ");
person.getTags().forEach(builder::append);
.append(person.getAddress());
if (!person.getTags().isEmpty()) {
builder.append("; Tags: ");
person.getTags().forEach(builder::append);
}
return builder.toString();
}

Expand Down

0 comments on commit bc495c9

Please sign in to comment.