Skip to content

Commit

Permalink
fix split_pick_up_emails to handle edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusPirvulescu committed Sep 15, 2024
1 parent f9db471 commit 02fb105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/partners/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def client_share_total
def split_pick_up_emails
return nil if pick_up_email.nil?

pick_up_email.delete(" ").delete_prefix(",").delete_suffix(",").split(",")
pick_up_email.split(/,|\s+/).compact_blank
end

private
Expand Down

0 comments on commit 02fb105

Please sign in to comment.