Fix mobile progress bar current page slot position

Regression 9595076dae
This commit is contained in:
schroda
2026-05-12 14:01:31 +02:00
parent 8dada86285
commit 9e34afbd5d
4 changed files with 40 additions and 32 deletions

View File

@@ -35,7 +35,8 @@ export const getValueFromObject = <T>(obj: Record<string, any>, key: string): T
return keys.reduce((acc, curr) => acc?.[curr], obj) as T;
};
export const coerceIn = (value: number, min: number, max: number): number => Math.max(Math.min(value, max), min);
export const coerceIn = (value: number, min: number, max: number = value): number =>
Math.max(Math.min(value, max), min);
export const noOp = () => {};