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
+3 -3
View File
@@ -17,10 +17,10 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
import { consoleLogger } from "../../../actions/core/logger";
import { getToken } from "../../../actions/core/token";
import { hasOwn } from "../../../components/utils";
import { hashAPIPath } from "../../../actions/core/hash";
import { respondError, respondSuccess } from "../middleware/apiResponse";
const WORDKEY = process.env.HASHKEY;
@@ -152,9 +152,9 @@ export default async function ApiProxy(req, res) {
let dataStr;
_.has(data, "@odata.nextLink") == true &&
hasOwn(data, "@odata.nextLink") == true &&
((dataStr = JSON.stringify(data["@odata.nextLink"])),
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
(data["@odata.nextLink"] = dataStr.split("/v9.2/")[1]));
return respondSuccess(res, data);
} catch (error) {
consoleLogger(error);
+3 -3
View File
@@ -16,11 +16,11 @@
*/
import axios from "axios";
import _ from "lodash";
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
import { getToken } from "../../../actions/core/token";
import { consoleLogger } from "../../../actions/core/logger";
import { hashAPIPath } from "../../../actions/core/hash";
import { hasOwn } from "../../../components/utils";
import { respondError, respondSuccess } from "../middleware/apiResponse";
const WEBAPI_URL =
@@ -60,9 +60,9 @@ export default async function ApiProxy(req, res) {
);
let dataStr;
_.has(data, "@odata.nextLink") == true &&
hasOwn(data, "@odata.nextLink") == true &&
((dataStr = JSON.stringify(data["@odata.nextLink"])),
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
(data["@odata.nextLink"] = dataStr.split("/v9.2/")[1]));
return respondSuccess(res, data);
} catch (error) {
consoleLogger(error);