No need to reset if theres nothing to reset

This commit is contained in:
Otard95 2021-06-02 21:12:14 +02:00
parent c5533f848a
commit 49a90c4b89

View file

@ -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`);