Skip to content

Commit

Permalink
Modify code to make tags optional during display for add command
Browse files Browse the repository at this point in the history
  • Loading branch information
xGladiate committed Nov 1, 2024
1 parent aa063f5 commit bfa42be
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 bfa42be

Please sign in to comment.