viz: fix bug with wrong program links (#11396)

This commit is contained in:
qazal
2025-07-28 02:52:06 +08:00
committed by GitHub
parent a5371f514b
commit a22417cc75
+1 -1
View File
@@ -162,7 +162,7 @@ async function renderProfiler() {
else if (ref != null) {
const start = ref.step>0 ? ref.step+1 : 0;
const stepIdx = ctxs[ref.ctx+1].steps.findIndex((s, i) => i >= start && s.name == e.name);
if (stepIdx !== -1) ref = {ctx:ref.ctx, step:stepIdx};
ref = stepIdx === -1 ? null : {ctx:ref.ctx, step:stepIdx};
}
const arg = { tooltipText:formatTime(e.dur), ...ref };
// offset y by depth