mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-21 13:06:01 +08:00
No need to reset if theres nothing to reset
This commit is contained in:
parent
c5533f848a
commit
49a90c4b89
1 changed files with 3 additions and 1 deletions
|
@ -141,7 +141,9 @@ function render() {
|
|||
}
|
||||
|
||||
export function reset() {
|
||||
if (ctx.resetTimeOut) clearTimeout(ctx.resetTimeOut);
|
||||
if (!ctx.resetTimeOut) return;
|
||||
|
||||
clearTimeout(ctx.resetTimeOut);
|
||||
const body = $(document.body);
|
||||
body.css("transition", "all .25s, transform 1s");
|
||||
body.css("transform", `none`);
|
||||
|
|
Loading…
Add table
Reference in a new issue