fix: error js

This commit is contained in:
2026-08-12 11:57:39 +02:00
parent ddec10ca8f
commit ab9de39556
2 changed files with 6 additions and 3 deletions
@@ -170,7 +170,10 @@ export default function VerticalSlider({
async function endDrag(e: React.PointerEvent<HTMLDivElement>) { async function endDrag(e: React.PointerEvent<HTMLDivElement>) {
if (!dragging.current) return; if (!dragging.current) return;
const target = e.currentTarget;
const pointerId = e.pointerId;
const finalValue = dragValue.current; const finalValue = dragValue.current;
const success = await onChange?.(finalValue); const success = await onChange?.(finalValue);
dragging.current = false; dragging.current = false;
@@ -181,8 +184,8 @@ export default function VerticalSlider({
onInput?.(value); onInput?.(value);
} }
if (e.currentTarget.hasPointerCapture(e.pointerId)) { if (target.hasPointerCapture(pointerId)) {
e.currentTarget.releasePointerCapture(e.pointerId); target.releasePointerCapture(pointerId);
} }
} }
@@ -187,7 +187,7 @@ function GateSection({ dsp, set_gate }: { dsp: DSP; set_gate: SetGateFn }) {
const inputState = dsp.state.current_config.input_states[input]; const inputState = dsp.state.current_config.input_states[input];
const idx = INPUT_METER_INDEX[input]; const idx = INPUT_METER_INDEX[input];
const meter = dsp.meters.channels[idx]; const meter = dsp.meters.channels[idx];
return <MeterBar label={inputState.name} meter={meter} />; return <MeterBar key={input} label={inputState.name} meter={meter} />;
})} })}
</div> </div>
</div> </div>