We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d15c8c commit ed25c94Copy full SHA for ed25c94
src/api/routes/payment.js
@@ -211,9 +211,10 @@ router.post(
211
paymentDetails = {
212
...paymentDetails,
213
firstName: customer.name ? customer.name.split(' ')[0] : null,
214
- lastName: customer.name
215
- ? customer.name.split(' ').slice(1).join(' ')
216
- : '',
+ lastName:
+ customer.name && customer.name.split(' ').length > 1
+ ? customer.name.split(' ').slice(1).join(' ')
217
+ : '',
218
email: customer.email,
219
phone: customer.phone,
220
};
0 commit comments