Comparing version 2.4.6 to 2.4.7
@@ -73,9 +73,10 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
var currentActive = activeRef.current; | ||
var canEnd; | ||
if (status === STATUS_APPEAR && activeRef.current) { | ||
if (status === STATUS_APPEAR && currentActive) { | ||
canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event); | ||
} else if (status === STATUS_ENTER && activeRef.current) { | ||
} else if (status === STATUS_ENTER && currentActive) { | ||
canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event); | ||
} else if (status === STATUS_LEAVE && activeRef.current) { | ||
} else if (status === STATUS_LEAVE && currentActive) { | ||
canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event); | ||
@@ -85,3 +86,3 @@ } // Only update status when `canEnd` and not destroyed | ||
if (canEnd !== false) { | ||
if (status !== STATUS_NONE && currentActive && canEnd !== false) { | ||
setStatus(STATUS_NONE, true); | ||
@@ -88,0 +89,0 @@ setStyle(null, true); |
@@ -92,9 +92,10 @@ "use strict"; | ||
var currentActive = activeRef.current; | ||
var canEnd; | ||
if (status === _interface.STATUS_APPEAR && activeRef.current) { | ||
if (status === _interface.STATUS_APPEAR && currentActive) { | ||
canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event); | ||
} else if (status === _interface.STATUS_ENTER && activeRef.current) { | ||
} else if (status === _interface.STATUS_ENTER && currentActive) { | ||
canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event); | ||
} else if (status === _interface.STATUS_LEAVE && activeRef.current) { | ||
} else if (status === _interface.STATUS_LEAVE && currentActive) { | ||
canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event); | ||
@@ -104,3 +105,3 @@ } // Only update status when `canEnd` and not destroyed | ||
if (canEnd !== false) { | ||
if (status !== _interface.STATUS_NONE && currentActive && canEnd !== false) { | ||
setStatus(_interface.STATUS_NONE, true); | ||
@@ -107,0 +108,0 @@ setStyle(null, true); |
{ | ||
"name": "rc-motion", | ||
"version": "2.4.6", | ||
"version": "2.4.7", | ||
"description": "React lifecycle controlled motion library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90011
1916