diff --git a/src/hooks/useVisibleRange.ts b/src/hooks/useVisibleRange.ts index 1fd56a0d..d546bfb5 100644 --- a/src/hooks/useVisibleRange.ts +++ b/src/hooks/useVisibleRange.ts @@ -38,7 +38,7 @@ export default function useVisibleRange( let endIndex = len; for (let i = 0; i < len; i += 1) { const offset = tabOffsets.get(tabs[i].key) || DEFAULT_SIZE; - if (offset[position] + offset[charUnit] > transformSize + visibleTabContentValue) { + if (Math.floor(offset[position] + offset[charUnit]) > Math.floor(transformSize + visibleTabContentValue)) { endIndex = i - 1; break; }