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
+11 -7
View File
@@ -20,7 +20,11 @@ import {
} from "../../actions/services/portalService";
import { splitWatchedCasesBySubmissionState } from "../../lib/domain/dashboard-policy";
import { consoleLogger } from "../../actions/core/logger";
import { getDetailsProxy, getFormCollectionByID } from "../../components/utils";
import {
getDetailsProxy,
getFormCollectionByID,
hasOwn
} from "../../components/utils";
import transLookup from "../../data/lookuptranslations.json";
import { setAwaitingSubmissionFromBlob } from "../../store/awaitingSubmission/action";
import {
@@ -469,7 +473,7 @@ const ViewAllResults = (props) => {
</span>
{isAwaitingSubmissionDetails
? formatDates(item.createdon)
: _.has(detailsObj, [
: hasOwn(detailsObj, [
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
])
? detailsObj[
@@ -488,7 +492,7 @@ const ViewAllResults = (props) => {
{t("search:searchresults-authority-label")}:
</span>
{isAwaitingSubmissionDetails &&
_.has(resultItem, "pinswg_lpaname")
hasOwn(resultItem, "pinswg_lpaname")
? router.locale === "cy"
? jsonpath({
path:
@@ -500,7 +504,7 @@ const ViewAllResults = (props) => {
})
: resultItem.pinswg_lpaname || "N/A"
: ""}
{_.has(resultItem, [
{hasOwn(resultItem, [
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
])
? router.locale === "cy"
@@ -518,7 +522,7 @@ const ViewAllResults = (props) => {
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] || "N/A"
: ""}
{_.has(searchDetailsObj[key], [
{hasOwn(searchDetailsObj[key], [
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
])
? router.locale === "cy"
@@ -541,7 +545,7 @@ const ViewAllResults = (props) => {
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
] || "N/A"
: ""}
{_.has(resultItem, [
{hasOwn(resultItem, [
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
])
? router.locale === "cy"
@@ -621,7 +625,7 @@ const ViewAllResults = (props) => {
: getFormCollectionByID(
searchDetailsObj[key].appealType
).value)}
{_.has(
{hasOwn(
searchDetailsObj[key],
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
)}