Merged PR 2442: remove lodash dependecies on _.has
Related work items: #23754
This commit is contained in:
@@ -313,7 +313,7 @@ function Radiofield(props) {
|
||||
//debugger;
|
||||
// parentField != false &&
|
||||
// !_.isEmpty(formProps[form]) &&
|
||||
// _.has(formProps[form].values, parentField) &&
|
||||
// hasOwn(formProps[form].values, parentField) &&
|
||||
// parentFieldShowOnValue.indexOf(
|
||||
// formProps[form].values[parentField].toString()
|
||||
// ) > -1;
|
||||
|
||||
@@ -21,7 +21,12 @@ import {
|
||||
setNewAppealProgress,
|
||||
setFileCount
|
||||
} from "../../store/appealType/action";
|
||||
import { getFormCollectionByID, getProgressObj, updateLinks } from "../utils";
|
||||
import {
|
||||
getFormCollectionByID,
|
||||
getProgressObj,
|
||||
updateLinks,
|
||||
hasOwn
|
||||
} from "../utils";
|
||||
import BuildRow from "./buildrow";
|
||||
import {
|
||||
parseXml,
|
||||
@@ -436,7 +441,7 @@ let BuildSection = (props) => {
|
||||
data-module="govuk-button"
|
||||
onClick={() => {
|
||||
getErrors();
|
||||
let valuesObj = _.has(
|
||||
let valuesObj = hasOwn(
|
||||
legacyFormState[props.form],
|
||||
"values"
|
||||
)
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
setAppealTypeID,
|
||||
setAppealTypeTitle
|
||||
} from "../../store/appealType/action";
|
||||
import { getFormCollectionByID } from "../utils";
|
||||
import { getFormCollectionByID, hasOwn } from "../utils";
|
||||
import Aboutyou from "./aboutyou";
|
||||
|
||||
const RenderLPAList = ({
|
||||
@@ -310,7 +310,7 @@ function Radiofield(props) {
|
||||
//debugger;
|
||||
// parentField != false &&
|
||||
// !_.isEmpty(formProps[form]) &&
|
||||
// _.has(formProps[form].values, parentField) &&
|
||||
// hasOwn(formProps[form].values, parentField) &&
|
||||
// parentFieldShowOnValue.indexOf(
|
||||
// formProps[form].values[parentField].toString()
|
||||
// ) > -1;
|
||||
@@ -491,7 +491,7 @@ let CreateCase = (props) => {
|
||||
var showIfHasParentShowValue =
|
||||
parentField != false &&
|
||||
!_.isEmpty(formProps[form]) &&
|
||||
_.has(formProps[form].values, parentField) &&
|
||||
hasOwn(formProps[form].values, parentField) &&
|
||||
parentFieldShowOnValue.indexOf(
|
||||
formProps[form].values[parentField].toString()
|
||||
) > -1;
|
||||
|
||||
Reference in New Issue
Block a user