diff --git a/src/Fields/Input/index.js b/src/Fields/Input/index.js index f7c50cfa..3b4382bb 100644 --- a/src/Fields/Input/index.js +++ b/src/Fields/Input/index.js @@ -7,7 +7,12 @@ import React from 'react' const Input = React.forwardRef(({ ...props }, ref) => { const { 'data-haserrors': haserrors } = props return ( - + ) }) diff --git a/src/Questions/Phone/index.js b/src/Questions/Phone/index.js index a4949e8b..fbdcfd2f 100644 --- a/src/Questions/Phone/index.js +++ b/src/Questions/Phone/index.js @@ -15,9 +15,12 @@ const QuestionPhone = ({ isMobile, isoCode, question, useForm, ...props }) => { } = useForm const getDefaultCountry = () => { - if (question.defaultCountry && question.defaultCountry !== '') + if ( + question?.defaultCountry && + typeof question.defaultCountry === 'string' + ) { return question.defaultCountry.toUpperCase() - + } if (isoCode) return isoCode.toUpperCase() return ''