diff --git a/components/dashboard/userAccount/detailUser/information/form/index.js b/components/dashboard/userAccount/detailUser/information/form/index.js index b6f0048..7066c94 100644 --- a/components/dashboard/userAccount/detailUser/information/form/index.js +++ b/components/dashboard/userAccount/detailUser/information/form/index.js @@ -110,7 +110,7 @@ function Form({ insurance, errors, changeData, information }) { { - changeData([Number(val.id)], name); + changeData(val?.id ? [Number(val.id)] : [], name); }} value={insurance?.find( (g) => @@ -144,7 +144,7 @@ function Form({ insurance, errors, changeData, information }) { - changeData(blood_group.find((g) => g.label === value).id, name) + changeData(blood_group.find((g) => g.label === value)?.id ?? "", name) } value={findVal(blood_group, "blood_type")} label="گروه خونی" @@ -178,7 +178,7 @@ function Form({ insurance, errors, changeData, information }) { - changeData(education.find((g) => g.label === value).id, name) + changeData(education.find((g) => g.label === value)?.id ?? "", name) } value={findVal(education, "education")} label="تحصیلات"