mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
refactor(replay-ui): export clampIndex for testing
This commit is contained in:
1 parent
e26100acf5
commit
e03da83cca
1 file changed
+1
-1
@@ -32,7 +32,7 @@ export function useStep(maxIndex: number | undefined): UseStepResult {
|
|||||||
return { runId, stepIndex: clamped, goTo };
|
return { runId, stepIndex: clamped, goTo };
|
||||||
}
|
}
|
||||||
|
|
||||||
function clampIndex(index: number, maxIndex: number | undefined): number {
|
export function clampIndex(index: number, maxIndex: number | undefined): number {
|
||||||
if (index < 1) {
|
if (index < 1) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user