Spaces:
Paused

superxuu commited on
Commit
f47c8b3
·
1 Parent(s): 73cb997

fix: Type error in Chart.tsx crosshair move handler

Browse files
Files changed (1) hide show
  1. frontend/src/components/Chart.tsx +1 -1
frontend/src/components/Chart.tsx CHANGED
@@ -129,7 +129,7 @@ export default function Chart({
129
 
130
  // 十字光标移动事件
131
  chart.subscribeCrosshairMove((param) => {
132
- if (!param.time || param.point.x < 0 || param.point.y < 0) {
133
  setLegendData(null);
134
  // 无光标时,传递 null 表示应显示最新数据
135
  onCrosshairMoveRef.current?.(null);
 
129
 
130
  // 十字光标移动事件
131
  chart.subscribeCrosshairMove((param) => {
132
+ if (!param.time || !param.point || param.point.x < 0 || param.point.y < 0) {
133
  setLegendData(null);
134
  // 无光标时,传递 null 表示应显示最新数据
135
  onCrosshairMoveRef.current?.(null);