We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b98e19 commit b24b72cCopy full SHA for b24b72c
packages/visualizer/src/compute.ts
@@ -177,12 +177,18 @@ const getNodeEdgePositions = (
177
.map((e) => {
178
const connectedId = e.source === nodeId ? e.target : e.source;
179
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
+
185
return {
186
id: connectedId,
187
isSource: e.source === nodeId,
188
x: connectedNode.x,
189
};
- });
190
+ })
191
+ .filter((node): node is NonNullable<typeof node> => node !== null);
192
193
// If there's only one connection, align both positions to that side
194
if (connectedNodes.length === 1) {
0 commit comments