From ab9de395563a09e8cd4dbc4641376564fab86120 Mon Sep 17 00:00:00 2001 From: LucasDLTG Date: Wed, 12 Aug 2026 11:57:39 +0200 Subject: [PATCH] fix: error js --- src/components/VerticalSlider/VerticalSlider.tsx | 7 +++++-- src/features/dsp408/components/GateSection/GateSection.tsx | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/VerticalSlider/VerticalSlider.tsx b/src/components/VerticalSlider/VerticalSlider.tsx index 88dbf9d..001f756 100644 --- a/src/components/VerticalSlider/VerticalSlider.tsx +++ b/src/components/VerticalSlider/VerticalSlider.tsx @@ -170,7 +170,10 @@ export default function VerticalSlider({ async function endDrag(e: React.PointerEvent) { if (!dragging.current) return; + const target = e.currentTarget; + const pointerId = e.pointerId; const finalValue = dragValue.current; + const success = await onChange?.(finalValue); dragging.current = false; @@ -181,8 +184,8 @@ export default function VerticalSlider({ onInput?.(value); } - if (e.currentTarget.hasPointerCapture(e.pointerId)) { - e.currentTarget.releasePointerCapture(e.pointerId); + if (target.hasPointerCapture(pointerId)) { + target.releasePointerCapture(pointerId); } } diff --git a/src/features/dsp408/components/GateSection/GateSection.tsx b/src/features/dsp408/components/GateSection/GateSection.tsx index dbedd65..455cadd 100644 --- a/src/features/dsp408/components/GateSection/GateSection.tsx +++ b/src/features/dsp408/components/GateSection/GateSection.tsx @@ -187,7 +187,7 @@ function GateSection({ dsp, set_gate }: { dsp: DSP; set_gate: SetGateFn }) { const inputState = dsp.state.current_config.input_states[input]; const idx = INPUT_METER_INDEX[input]; const meter = dsp.meters.channels[idx]; - return ; + return ; })}