Skip to content

Commit

Permalink
chore(mesh-wide): prevent deleted node on reference
Browse files Browse the repository at this point in the history
  • Loading branch information
selankon committed Sep 5, 2024
1 parent 0b1c0bc commit 0577b31
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ export const mergeLinksAndCoordinates = <T extends LinkType>(
let destLoc = linkData?.dst_loc;
// If destination coords are undefined, try to find it on other ways.
if (!destLoc) {
if (dest && links[Object.keys(dest)[0]].src_loc) {
if (
dest &&
!isEmpty(dest) &&
links[Object.keys(dest)[0]]?.src_loc
) {
// If we have destination link info, try to find the src_loc
destLoc = links[Object.keys(dest)[0]].src_loc;
} else {
Expand Down

0 comments on commit 0577b31

Please sign in to comment.