Merged PR 2442: remove lodash dependecies on _.has
Related work items: #23754
This commit is contained in:
@@ -42,10 +42,10 @@
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import _ from "lodash";
|
||||
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
|
||||
import { respondError } from "../middleware/apiResponse";
|
||||
import { relayGet } from "../middleware/relayForwarding";
|
||||
import { hasOwn } from "../../../components/utils";
|
||||
import { RELAY_POLICY_SEARCH_PAGED } from "../middleware/relayPolicyPresets";
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
@@ -121,9 +121,9 @@ export default async function ApiProxy(req, res) {
|
||||
azureHeadersPagedCustom(accessToken, showNumberOfRecords),
|
||||
relayPolicy,
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user