- {(typeof props.representationType != "undefined" ||
- typeof formObj.representationForm.values
- .representationType != "undefined") &&
+ {(_.has(formObj["representationForm"], [
+ "values",
+ "representationType",
+ ]) ||
+ typeof props.representationType != "undefined") &&
(props.representationType != "Questionnaire" ? (
<>
{(typeof props.representationType != "undefined" ||
- typeof formObj.representationForm.values
- .representationType != "undefined") &&
+ _.has(formObj, "values", "representationType")) &&
props.representationType == "Questionnaire" && (
<>
{showQuestionnaireSection}
@@ -423,8 +456,7 @@ let RepLPA = (props) => {
>
)}{" "}
{(typeof props.representationType != "undefined" ||
- typeof formObj.representationForm.values
- .representationType != "undefined") &&
+ _.has(formObj, "values", "representationType")) &&
props.representationType != "Questionnaire" && (
<>