Skip to content

Commit

Permalink
Merge pull request #269 from ethan-goh/fix-bugs-pe-d
Browse files Browse the repository at this point in the history
Fix bugs pertaining to PE-D
  • Loading branch information
JYL27 authored Nov 12, 2024
2 parents f30993f + d0c2bfa commit 973e162
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/logic/commands/ClearCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class ClearCommand extends Command {
public CommandResult execute(Model model) {
requireNonNull(model);
model.setEduContacts(new EduContacts());
return new CommandResult(MESSAGE_SUCCESS);
model.setPersonToDisplay(null);
return new CommandResult(MESSAGE_SUCCESS, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public EditCommand parse(String args) throws ParseException {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));
}

String[] modules = argMultimap.getValue(PREFIX_MODULE).get().split(" ");
String[] modules = argMultimap.getValue(PREFIX_MODULE).get().trim().replaceAll("\\s+", " ").split(" ");
if (modules.length != 2) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));
}
Expand Down

0 comments on commit 973e162

Please sign in to comment.