diff --git a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js index 03775be..ad55cc4 100644 --- a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js +++ b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js @@ -173,7 +173,7 @@ const CustomFormWizard = (props) => { add += str.trim() ? str.trim() + ", " : ""; }); add = add.trim(); - if (add.slice(- 1) == ",") { + if (add?.slice(- 1) == ",") { add = add.substring(0, add.length - 1); } return add; @@ -449,10 +449,10 @@ const CustomFormWizard = (props) => { {/* {iAmSmartData.idNo + "(" + iAmSmartData.checkDigit + ")"} */} - {iAmSmartData.idNo.slice(0, 4)} + {iAmSmartData?.idNo?.slice(0, 4)} - {showId ?iAmSmartData.idNo.slice(4):"****"}{showId ? '(' + iAmSmartData.checkDigit + ')' :null} + {showId ?iAmSmartData?.idNo?.slice(4):"****"}{showId ? '(' + iAmSmartData.checkDigit + ')' :null} { - {formik.values.idNo.slice(0, 4)} + {formik?.values?.idNo?.slice(0, 4)} {/* {formik.values.idNo + "(" + formik.values.checkDigit + ")"} */} - {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 + ")"} */}