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
@@ -41,8 +41,7 @@
* 200:
* description: Success
*/
import _ from "lodash";
import { hasOwn } from "../../../components/utils";
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
import { respondError } from "../middleware/apiResponse";
import { relayGet } from "../middleware/relayForwarding";
@@ -96,9 +95,9 @@ export default async function ApiProxy(req, res) {
requestOptionsBuilder: (accessToken) =>
azureHeadersPagedCustom(accessToken, showNumberOfRecords),
transformData: (data) => {
if (_.has(data, "@odata.nextLink") === true) {
if (hasOwn(data, "@odata.nextLink") === true) {
const dataStr = JSON.stringify(data["@odata.nextLink"]);
data["@odata.nextLink"] = dataStr.split("/v8.2/")[1];
data["@odata.nextLink"] = dataStr.split("/v9.2/")[1];
}
return data;