mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-01 23:10:37 +01: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",
|
"name": "blitzkrieg",
|
||||||
"version": "1.15.1",
|
"version": "1.15.2",
|
||||||
"description": "🎉 Tools for everything World of Tanks Blitz",
|
"description": "🎉 Tools for everything World of Tanks Blitz",
|
||||||
"main": "src/server.ts",
|
"main": "src/server.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -347,9 +347,9 @@ export default function Page() {
|
|||||||
async function jumpToPosition(position: number) {
|
async function jumpToPosition(position: number) {
|
||||||
if (!ratingsInfo || ratingsInfo?.detail) return;
|
if (!ratingsInfo || ratingsInfo?.detail) return;
|
||||||
|
|
||||||
const targetPosition = Math.max(
|
const targetPosition = Math.min(
|
||||||
0,
|
ratingsInfo.count - 1,
|
||||||
Math.min(position, ratingsInfo.count - 1),
|
Math.max(0, Math.min(position, ratingsInfo.count - 1)),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (season === 0) {
|
if (season === 0) {
|
||||||
|
|||||||
Reference in new issue
Block a user