Skip to content

Commit

Permalink
chore(mesh-wide): fix links inside links
Browse files Browse the repository at this point in the history
  • Loading branch information
selankon committed Sep 5, 2024
1 parent 11ef37a commit 0b1c0bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/lime-plugin-mesh-wide/src/meshWideQueries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,14 @@ export const useSetLinkReferenceState = ({
mutationFn: ({ ip }) => {
const hostname = nodesToUpdate[ip];

let newReferenceLinks = (referenceData[hostname] ??
let newReferenceLinks = (referenceData[hostname].links ??
{}) as IBaseLink<typeof linkType>;

// This is a hotfix because backend returns an empty array sometimes
if (isEmpty(newReferenceLinks)) newReferenceLinks = {};

console.log("PREEE ", newReferenceLinks);

for (const mactomac of linkToUpdate.links) {
if (isDown) {
delete newReferenceLinks[mactomac.id];
Expand Down

0 comments on commit 0b1c0bc

Please sign in to comment.