Skip to content

Commit b24b72c

Browse files
committed
fix external node links
1 parent 5b98e19 commit b24b72c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/visualizer/src/compute.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,18 @@ const getNodeEdgePositions = (
177177
.map((e) => {
178178
const connectedId = e.source === nodeId ? e.target : e.source;
179179
const connectedNode = dagreGraph.node(connectedId);
180+
// Filter out edges where the connected node doesn't exist in the graph (like auth.users)
181+
if (!connectedNode) {
182+
return null;
183+
}
184+
180185
return {
181186
id: connectedId,
182187
isSource: e.source === nodeId,
183188
x: connectedNode.x,
184189
};
185-
});
190+
})
191+
.filter((node): node is NonNullable<typeof node> => node !== null);
186192

187193
// If there's only one connection, align both positions to that side
188194
if (connectedNodes.length === 1) {

0 commit comments

Comments
 (0)