diff --git a/src/hooks/useVisibleRange.ts b/src/hooks/useVisibleRange.ts index 7f665479..e6c865cc 100644 --- a/src/hooks/useVisibleRange.ts +++ b/src/hooks/useVisibleRange.ts @@ -57,7 +57,10 @@ export default function useVisibleRange( break; } } - + if (startIndex > endIndex) { + endIndex = startIndex; + } + return [startIndex, endIndex]; }, [ tabOffsets,