Merged PR 2442: remove lodash dependecies on _.has

Related work items: #23754
This commit is contained in:
Robert Bond
2026-06-29 13:08:06 +00:00
parent 7b6af58065
commit ff699735c7
85 changed files with 870 additions and 952 deletions
+6 -2
View File
@@ -13,6 +13,10 @@ import data from "../../data/collections.json";
import xpath from "xpath";
export function hasOwn(obj, key) {
return obj != null && Object.prototype.hasOwnProperty.call(obj, key);
}
/*
* Get the lookup collection by the appeal type entity
* @param String formtype - string from appeal entity name
@@ -372,10 +376,10 @@ export const getProgressObj = (
"totalFields": formObj[key].fieldsTotal,
"allFieldsComplete":
titleList[key].value == "Upload documents"
? (_.has(props.props.appealType.fileList, "value") &&
? (hasOwn(props.props.appealType.fileList, "value") &&
props.props.appealType.fileList.value.length >
0) ||
(_.has(props.props.form.appealForm, "values") &&
(hasOwn(props.props.form.appealForm, "values") &&
Object.keys(
props.props.form.appealForm.values
).filter((k) => k.startsWith("pinswg_fileUpload"))