mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: add max target position
This commit is contained in:
1 parent
032d98e6bd
commit
c1ecef0179
2 files changed
+4
-4
No files matched your search
@@ -347,9 +347,9 @@ export default function Page() {
|
||||
async function jumpToPosition(position: number) {
|
||||
if (!ratingsInfo || ratingsInfo?.detail) return;
|
||||
|
||||
const targetPosition = Math.max(
|
||||
0,
|
||||
Math.min(position, ratingsInfo.count - 1),
|
||||
const targetPosition = Math.min(
|
||||
ratingsInfo.count - 1,
|
||||
Math.max(0, Math.min(position, ratingsInfo.count - 1)),
|
||||
);
|
||||
|
||||
if (season === 0) {
|
||||
|
||||
Reference in new issue
Block a user