mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +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
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "blitzkrieg",
|
||||
"version": "1.15.1",
|
||||
"version": "1.15.2",
|
||||
"description": "🎉 Tools for everything World of Tanks Blitz",
|
||||
"main": "src/server.ts",
|
||||
"type": "module",
|
||||
|
||||
@@ -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