qinlaiqiao пре 4 година
родитељ
комит
573388bfcf
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/views/login/scripts/rotateCanvas.ts

+ 2 - 2
src/views/login/scripts/rotateCanvas.ts

@@ -125,12 +125,12 @@ export default function useRotateCanvas() {
         );
       };
 
-      function animate() {
+      const animate = () => {
         ctx.clearRect(0, 0, CANVAS_W, CANVAS_H);
         rotateBlue && rotateBlue.draw();
         rotateYellow && rotateYellow.draw();
         requestAnimationFrame(animate);
-      }
+      };
 
       animate();
     }