Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-motion

Package Overview
Dependencies
Maintainers
3
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-motion - npm Package Compare versions

Comparing version 2.4.6 to 2.4.7

9

es/hooks/useStatus.js

@@ -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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc