diff --git a/@ecomplus/widget-compre-confie/src/index.js b/@ecomplus/widget-compre-confie/src/index.js index 5514e5149..924486aab 100644 --- a/@ecomplus/widget-compre-confie/src/index.js +++ b/@ecomplus/widget-compre-confie/src/index.js @@ -47,8 +47,10 @@ export default (options = {}) => { } if (customer.birth_date) { const { day, month, year } = customer.birth_date - ccParam += `&consumerBirthDate=${day.toString().padStart(2, '0')}` + - `/${month.toString().padStart(2, '0')}/${year}` + if (day && month && year) { + ccParam += `&consumerBirthDate=${day.toString().padStart(2, '0')}` + + `/${month.toString().padStart(2, '0')}/${year}` + } } if (navigator && navigator.userAgent.includes('Mobile')) { ccParam += '&orderPlatform=1'