Merged PR 2442: remove lodash dependecies on _.has
Related work items: #23754
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user