| @@ -173,7 +173,7 @@ const CustomFormWizard = (props) => { | |||||
| add += str.trim() ? str.trim() + ", " : ""; | add += str.trim() ? str.trim() + ", " : ""; | ||||
| }); | }); | ||||
| add = add.trim(); | add = add.trim(); | ||||
| if (add.slice(- 1) == ",") { | |||||
| if (add?.slice(- 1) == ",") { | |||||
| add = add.substring(0, add.length - 1); | add = add.substring(0, add.length - 1); | ||||
| } | } | ||||
| return add; | return add; | ||||
| @@ -449,10 +449,10 @@ const CustomFormWizard = (props) => { | |||||
| {/* {iAmSmartData.idNo + "(" + iAmSmartData.checkDigit + ")"} */} | {/* {iAmSmartData.idNo + "(" + iAmSmartData.checkDigit + ")"} */} | ||||
| </Typography> | </Typography> | ||||
| <Typography variant="h5"> | <Typography variant="h5"> | ||||
| {iAmSmartData.idNo.slice(0, 4)} | |||||
| {iAmSmartData?.idNo?.slice(0, 4)} | |||||
| </Typography> | </Typography> | ||||
| <Typography variant="h5"> | <Typography variant="h5"> | ||||
| {showId ?iAmSmartData.idNo.slice(4):"****"}{showId ? '(' + iAmSmartData.checkDigit + ')' :null} | |||||
| {showId ?iAmSmartData?.idNo?.slice(4):"****"}{showId ? '(' + iAmSmartData.checkDigit + ')' :null} | |||||
| </Typography> | </Typography> | ||||
| <IconButton | <IconButton | ||||
| aria-label="toggle id visibility" | aria-label="toggle id visibility" | ||||
| @@ -972,11 +972,11 @@ const CustomFormWizard = (props) => { | |||||
| <FormattedMessage id="userIdDoc" /> | <FormattedMessage id="userIdDoc" /> | ||||
| </Typography> | </Typography> | ||||
| <Typography variant="h5" name="preview-idDocType-1"> | <Typography variant="h5" name="preview-idDocType-1"> | ||||
| {formik.values.idNo.slice(0, 4)} | |||||
| {formik?.values?.idNo?.slice(0, 4)} | |||||
| {/* {formik.values.idNo + "(" + formik.values.checkDigit + ")"} */} | {/* {formik.values.idNo + "(" + formik.values.checkDigit + ")"} */} | ||||
| </Typography> | </Typography> | ||||
| <Typography variant="h5" name="preview-idDocType-2"> | <Typography variant="h5" name="preview-idDocType-2"> | ||||
| {showComId ?formik.values.idNo.slice(4):"****"}{showComId ? '(' + formik.values.checkDigit + ')' : null} | |||||
| {showComId ?formik?.values?.idNo?.slice(4):"****"}{showComId ? '(' + formik.values.checkDigit + ')' : null} | |||||
| {/* {formik.values.idNo + "(" + formik.values.checkDigit + ")"} */} | {/* {formik.values.idNo + "(" + formik.values.checkDigit + ")"} */} | ||||
| </Typography> | </Typography> | ||||
| <IconButton | <IconButton | ||||