Skip to content

Commit

Permalink
chore: appending last name with spaces (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja authored Dec 19, 2024
1 parent 5b43a53 commit e54f0ae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Utilities/DynamicFieldsUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ let getName = (item: PaymentMethodsRecord.required_fields, field: RecoilAtomType
| "last_name" =>
fieldNameArr
->Array.sliceToEnd(~start=1)
->Array.reduce("", (acc, item) => {
acc ++ item
})
->Array.reduce("", (acc, item) => acc === "" ? item : `${acc} ${item}`)
| _ => field.value
}
}
Expand Down

0 comments on commit e54f0ae

Please sign in to comment.