fix: background loader not showing

This commit is contained in:
Miodec 2025-12-11 22:13:12 +01:00
parent 95bd39a20e
commit d43fcba221

View file

@ -1,4 +1,4 @@
import { animate, JSAnimation } from "animejs";
import { JSAnimation } from "animejs";
import { requestDebouncedAnimationFrame } from "../utils/debounced-animation-frame";
import { qsr } from "../utils/dom";
@ -7,7 +7,7 @@ let showAnim: JSAnimation | null = null;
export function show(instant = false): void {
requestDebouncedAnimationFrame("loader.show", () => {
showAnim = animate(element, {
showAnim = element.animate({
opacity: 1,
duration: 125,
delay: instant ? 0 : 125,
@ -21,7 +21,7 @@ export function show(instant = false): void {
export function hide(): void {
requestDebouncedAnimationFrame("loader.hide", () => {
showAnim?.pause();
animate(element, {
element.animate({
opacity: 0,
duration: 125,
onComplete: () => {