mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-24 23:07:25 +08:00
fix: resolve fps counter showing increased fps when opened multiple times (@blru) (#5990)
This commit is contained in:
parent
3df9ca4808
commit
bf1f3202fb
1 changed files with 2 additions and 1 deletions
|
|
@ -25,7 +25,8 @@ export function start(): void {
|
|||
stopLoop = false;
|
||||
frameCount = 0;
|
||||
startTime = performance.now();
|
||||
fpsInterval = window.requestAnimationFrame(loop);
|
||||
|
||||
if (!fpsInterval) fpsInterval = window.requestAnimationFrame(loop);
|
||||
el.classList.remove("hidden");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue