Skip to content

Commit

Permalink
Fix split for blood type string
Browse files Browse the repository at this point in the history
  • Loading branch information
NatLeong committed Mar 20, 2024
1 parent b991194 commit fa47bdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/storage/JsonAdaptedPerson.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public Person toModelType() throws IllegalValueException {
}
// BloodType check
if (bloodType.isPresent()) {
String[] parts = bloodType.get().split("\\s+");
String[] parts = bloodType.get().split("(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)");
final BloodType modelBloodType = new BloodType(parts[0], parts[1]);
person.setBloodType(modelBloodType);
}
Expand Down

0 comments on commit fa47bdc

Please sign in to comment.