diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index 76459ab330..36ed925182 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -232,7 +232,7 @@ export async function mainBoot() { if (!claimedAchievements.includes('justPlainLucky')) { window.setInterval(() => { - if (Math.floor(Math.random() * 20000) === 0) { + if (document.visibilityState === 'visible' && Math.floor(Math.random() * 20000) === 0) { claimAchievement('justPlainLucky'); } }, 1000 * 10);