@janiscommerce/ui-web 0.40.0 → 0.40.2

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.umd.js CHANGED
@@ -16082,17 +16082,19 @@
16082
16082
  var stopAnimation = function stopAnimation() {
16083
16083
  var _markerRef$current2;
16084
16084
 
16085
- if (timeoutRef.current) clearTimeout(timeoutRef.current);
16086
16085
  if ((_markerRef$current2 = markerRef.current) !== null && _markerRef$current2 !== void 0 && _markerRef$current2.marker) markerRef.current.marker.setAnimation(null);
16087
16086
  };
16088
16087
 
16089
16088
  var startAnimation = function startAnimation() {
16090
16089
  if (!markerRef.current) return;
16091
- stopAnimation();
16090
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
16092
16091
  markerRef.current.marker.setAnimation(window.google.maps.Animation[animation === null || animation === void 0 ? void 0 : animation.name]);
16093
- if (animation !== null && animation !== void 0 && animation.duration && isNumber(animation === null || animation === void 0 ? void 0 : animation.duration)) timeoutRef.current = setTimeout(function () {
16094
- return stopAnimation();
16095
- }, animation.duration);
16092
+
16093
+ if (animation !== null && animation !== void 0 && animation.duration && isNumber(animation === null || animation === void 0 ? void 0 : animation.duration)) {
16094
+ timeoutRef.current = setTimeout(function () {
16095
+ return stopAnimation();
16096
+ }, animation.duration);
16097
+ }
16096
16098
  };
16097
16099
 
16098
16100
  React.useEffect(function () {