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

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
@@ -846,6 +846,9 @@ function BagAnimation({
846
846
  }, [isAnimating]);
847
847
  (0, import_react.useEffect)(() => {
848
848
  if (!isAnimating || !canvasRef.current || !hasChances) {
849
+ if (!hasChances && isAnimating) {
850
+ setIsAnimating(false);
851
+ }
849
852
  return;
850
853
  }
851
854
  const canvas = canvasRef.current;
package/dist/index.mjs CHANGED
@@ -830,6 +830,9 @@ function BagAnimation({
830
830
  }, [isAnimating]);
831
831
  useEffect(() => {
832
832
  if (!isAnimating || !canvasRef.current || !hasChances) {
833
+ if (!hasChances && isAnimating) {
834
+ setIsAnimating(false);
835
+ }
833
836
  return;
834
837
  }
835
838
  const canvas = canvasRef.current;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chao-component/bag-animation-ui",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",