removed lodash
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {uniqBy} from "lodash";
|
||||
import {uniqueBy} from "../../../helpers.js";
|
||||
import axios from "axios";
|
||||
|
||||
export function insertEdges(graph, sourceRecord, targetRecords, fieldName, action = "") {
|
||||
@@ -17,8 +17,8 @@ export function insertEdges(graph, sourceRecord, targetRecords, fieldName, actio
|
||||
replacedEdges = replacedEdges.filter((edge) => edge.field !== field.name);
|
||||
}
|
||||
|
||||
graph.records = uniqBy([...graph.records, ...targetRecords], (r) => r.id);
|
||||
graph.edges = uniqBy([...replacedEdges, ...newEdges], (edge) => edge.source + edge.target + edge.field + edge.depth);
|
||||
graph.records = uniqueBy([...graph.records, ...targetRecords], (r) => r.id);
|
||||
graph.edges = uniqueBy([...replacedEdges, ...newEdges], (edge) => edge.source + edge.target + edge.field + edge.depth);
|
||||
return graph;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user