Merged PR 2442: remove lodash dependecies on _.has
Related work items: #23754
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
//import fs from "fs";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
@@ -12,6 +11,7 @@ import Header from "../../components/header";
|
||||
import Search from "../../components/myportal/addresssearch";
|
||||
import ServiceBanner from "../../components/myportal/servicebanner";
|
||||
import TimeOut from "../../components/timeout";
|
||||
import { hasOwn } from "../../components/utils";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages } = props;
|
||||
@@ -22,8 +22,8 @@ const Home = (props) => {
|
||||
const { appealtypes } = router.query;
|
||||
|
||||
var hasError =
|
||||
_.has(props.LPAData.LPAData, "errorCode") ||
|
||||
_.has(props.appealType.appealType, "errorCode")
|
||||
hasOwn(props.LPAData.LPAData, "errorCode") ||
|
||||
hasOwn(props.appealType.appealType, "errorCode")
|
||||
? true
|
||||
: false;
|
||||
|
||||
@@ -123,7 +123,7 @@ const mapStateToProps = (state) => {
|
||||
appealType: state.appealType,
|
||||
LPAData: state.LPAData,
|
||||
//form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
accountDetails: state.accountDetails
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import _ from "lodash";
|
||||
import { getSession } from "next-auth/react";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import Head from "next/head";
|
||||
@@ -28,6 +27,7 @@ import { setLPA, setCaseStatus } from "../../store/lpa/action";
|
||||
import { wrapper } from "../../store/store";
|
||||
import ServiceBanner from "../../components/myportal/servicebanner";
|
||||
import { getCaseStatus } from "../../actions/services/caseDirectService";
|
||||
import { hasOwn } from "../../components/utils";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages } = props;
|
||||
@@ -38,8 +38,8 @@ const Home = (props) => {
|
||||
const { appealtypes } = router.query;
|
||||
|
||||
var hasError =
|
||||
_.has(props.LPAData.LPAData, "errorCode") ||
|
||||
_.has(props.appealType.appealType, "errorCode")
|
||||
hasOwn(props.LPAData.LPAData, "errorCode") ||
|
||||
hasOwn(props.appealType.appealType, "errorCode")
|
||||
? true
|
||||
: false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user