fix animation function if called multiple times

This commit is contained in:
schlagmichdoch 2022-12-31 12:14:56 +01:00
parent 651047cfa8
commit 0436a2185a
2 changed files with 7 additions and 3 deletions

View file

@ -659,8 +659,12 @@ Events.on('load', () => {
}
}
window.animateBackground = function(l) {
loading = l;
animate();
if (!l) {
loading = false;
} else if (!loading) {
loading = true;
animate();
}
};
init();
animate();