diff --git a/components/SlideToConfirm.tsx b/components/SlideToConfirm.tsx index 9cdeb50..9aa496d 100644 --- a/components/SlideToConfirm.tsx +++ b/components/SlideToConfirm.tsx @@ -45,8 +45,10 @@ export function SlideToConfirm({ label = 'Slide to confirm', color = '#059669', ).current; // Interpolate opacity of the label as handle moves right + // Guard: inputRange must be monotonically non-decreasing (maxX could be 0 before layout) + const safeMax = Math.max(maxX * 0.5, 1); const labelOpacity = pan.interpolate({ - inputRange: [0, maxX * 0.5], + inputRange: [0, safeMax], outputRange: [1, 0], extrapolate: 'clamp', });