Merged PR 2442: remove lodash dependecies on _.has
Related work items: #23754
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user