Skip to content

Commit

Permalink
check if edge is deleted when getEdges
Browse files Browse the repository at this point in the history
  • Loading branch information
sshugsc committed Feb 11, 2025
1 parent 04b1d9d commit 3cca6cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/services/schema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ function getEdges<ReqFields extends string = string>(node: GeneralRecordType<Req
const edges: EdgeType[] = [];
Object.keys(node)
.filter((key) => key.split('_')[1] && list.includes(key.split('_')[1]))
.forEach((key) => edges.push(...node[key]));
.forEach((key) => {
if (node[key].deletedAt === null) {
edges.push(...node[key]);
}
});
return edges;
}

Expand Down

0 comments on commit 3cca6cd

Please sign in to comment.