@chao-component/bag-animation-ui 1.0.18 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -845,7 +845,9 @@ function BagAnimation({
845
845
  }
846
846
  }, [isAnimating]);
847
847
  (0, import_react.useEffect)(() => {
848
- if (!isAnimating || !canvasRef.current || !hasChances) return;
848
+ if (!isAnimating || !canvasRef.current || !hasChances) {
849
+ return;
850
+ }
849
851
  const canvas = canvasRef.current;
850
852
  const ctx = canvas.getContext("2d");
851
853
  if (!ctx) return;
@@ -940,7 +942,7 @@ function BagAnimation({
940
942
  animationRefs.current[frame].stop();
941
943
  }
942
944
  };
943
- }, [frame, isAnimating, setIsAnimating, doneFunction]);
945
+ }, [frame, isAnimating, doneFunction]);
944
946
  (0, import_react.useEffect)(() => {
945
947
  if (isPausedAtThird && thirdFrameCtxRef.current && thirdFrameApngRef.current && thirdFramePlayerRef.current && canvasRef.current && thirdFrameOriginalSizeRef.current) {
946
948
  const apng = thirdFrameApngRef.current;
package/dist/index.mjs CHANGED
@@ -829,7 +829,9 @@ function BagAnimation({
829
829
  }
830
830
  }, [isAnimating]);
831
831
  useEffect(() => {
832
- if (!isAnimating || !canvasRef.current || !hasChances) return;
832
+ if (!isAnimating || !canvasRef.current || !hasChances) {
833
+ return;
834
+ }
833
835
  const canvas = canvasRef.current;
834
836
  const ctx = canvas.getContext("2d");
835
837
  if (!ctx) return;
@@ -924,7 +926,7 @@ function BagAnimation({
924
926
  animationRefs.current[frame].stop();
925
927
  }
926
928
  };
927
- }, [frame, isAnimating, setIsAnimating, doneFunction]);
929
+ }, [frame, isAnimating, doneFunction]);
928
930
  useEffect(() => {
929
931
  if (isPausedAtThird && thirdFrameCtxRef.current && thirdFrameApngRef.current && thirdFramePlayerRef.current && canvasRef.current && thirdFrameOriginalSizeRef.current) {
930
932
  const apng = thirdFrameApngRef.current;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chao-component/bag-animation-ui",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",