mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
refactor(first_name): check if first_name is sent as empty string (#4832)
This commit is contained in:
@ -2904,7 +2904,11 @@ impl AddressDetails {
|
||||
|
||||
pub fn unify_address_details(self, other: Option<&Self>) -> Self {
|
||||
if let Some(other) = other {
|
||||
let (first_name, last_name) = if self.first_name.is_some() {
|
||||
let (first_name, last_name) = if self
|
||||
.first_name
|
||||
.as_ref()
|
||||
.is_some_and(|first_name| !first_name.is_empty_after_trim())
|
||||
{
|
||||
(self.first_name, self.last_name)
|
||||
} else {
|
||||
(other.first_name.clone(), other.last_name.clone())
|
||||
|
||||
Reference in New Issue
Block a user