From 4529e9c2afba2db20d2f1925e72234e08fc4aa75 Mon Sep 17 00:00:00 2001 From: anubra266 Date: Sun, 24 Nov 2024 18:15:34 -0800 Subject: [PATCH] chore: add clamps --- packages/machines/angle-slider/src/angle-slider.machine.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/machines/angle-slider/src/angle-slider.machine.ts b/packages/machines/angle-slider/src/angle-slider.machine.ts index 4b778eb9b8..add222f40c 100644 --- a/packages/machines/angle-slider/src/angle-slider.machine.ts +++ b/packages/machines/angle-slider/src/angle-slider.machine.ts @@ -176,6 +176,8 @@ const invoke = { const set = { value: (ctx: MachineContext, value: number) => { if (ctx.value === value) return + if (value < MIN_VALUE || value > MAX_VALUE) return + ctx.value = value invoke.valueChange(ctx) },