fix: handle null positions correctly

This commit is contained in:
Ayush Kumar 2026-01-25 17:14:52 -08:00
parent 25a6747d7d
commit 777715aa4d

View File

@ -528,7 +528,7 @@ async function renderGraph(graph: HTMLElement, fullSlug: FullSlug) {
if (stopAnimation) return
for (const n of nodeRenderData) {
const { x, y } = n.simulationData
if (!x || !y) continue
if (x == null || y == null) continue
n.gfx.position.set(x + width / 2, y + height / 2)
if (n.label) {
n.label.position.set(x + width / 2, y + height / 2)