diff --git a/src/lib/HelperFunctions.ts b/src/lib/HelperFunctions.ts index 9561089b..3cac3606 100644 --- a/src/lib/HelperFunctions.ts +++ b/src/lib/HelperFunctions.ts @@ -38,6 +38,6 @@ export const getValueFromObject = (obj: Record, key: string): T return keys.reduce((acc, curr) => acc?.[curr], obj) as T; }; -export const coerceIn = (value: number, min: number, max: number): number => Math.min(Math.max(value, min), max); +export const coerceIn = (value: number, min: number, max: number): number => Math.max(Math.min(value, max), min); export const noOp = () => {};