mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
fix: null check
This commit is contained in:
1 parent
d34bc4db06
commit
eb87463f08
1 file changed
+3
-1
+3
-1
@@ -73,6 +73,9 @@ times(THREADS, async () => {
|
|||||||
|
|
||||||
const filteredIds = ids.filter((_, index) => {
|
const filteredIds = ids.filter((_, index) => {
|
||||||
const info = accountInfo[index];
|
const info = accountInfo[index];
|
||||||
|
|
||||||
|
if (info === null) return false;
|
||||||
|
|
||||||
const timeSinceLastActivity = Date.now() - info.last_battle_time * 1000;
|
const timeSinceLastActivity = Date.now() - info.last_battle_time * 1000;
|
||||||
|
|
||||||
samples.total++;
|
samples.total++;
|
||||||
@@ -84,7 +87,6 @@ times(THREADS, async () => {
|
|||||||
if (timeSinceLastActivity <= 1 * DAY) samples.d_1++;
|
if (timeSinceLastActivity <= 1 * DAY) samples.d_1++;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
info !== null &&
|
|
||||||
timeSinceLastActivity <= MAX_ACTIVITY_TIME &&
|
timeSinceLastActivity <= MAX_ACTIVITY_TIME &&
|
||||||
info.statistics.all.battles > MIN_BATTLES
|
info.statistics.all.battles > MIN_BATTLES
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user