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

@rc-component/trigger

Package Overview
Dependencies
Maintainers
4
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rc-component/trigger - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

7

es/TriggerWrapper.js

@@ -1,2 +0,2 @@

import { fillRef, useComposeRef } from "rc-util/es/ref";
import { fillRef, supportRef, useComposeRef } from "rc-util/es/ref";
import * as React from 'react';

@@ -6,2 +6,3 @@ var TriggerWrapper = /*#__PURE__*/React.forwardRef(function (props, ref) {

getTriggerDOMNode = props.getTriggerDOMNode;
var canUseRef = supportRef(children);

@@ -13,5 +14,5 @@ // When use `getTriggerDOMNode`, we should do additional work to get the real dom

var mergedRef = useComposeRef(setRef, children.ref);
return /*#__PURE__*/React.cloneElement(children, {
return canUseRef ? /*#__PURE__*/React.cloneElement(children, {
ref: mergedRef
});
}) : children;
});

@@ -18,0 +19,0 @@ if (process.env.NODE_ENV !== 'production') {

@@ -13,2 +13,3 @@ "use strict";

getTriggerDOMNode = props.getTriggerDOMNode;
var canUseRef = (0, _ref.supportRef)(children);

@@ -20,5 +21,5 @@ // When use `getTriggerDOMNode`, we should do additional work to get the real dom

var mergedRef = (0, _ref.useComposeRef)(setRef, children.ref);
return /*#__PURE__*/React.cloneElement(children, {
return canUseRef ? /*#__PURE__*/React.cloneElement(children, {
ref: mergedRef
});
}) : children;
});

@@ -25,0 +26,0 @@ if (process.env.NODE_ENV !== 'production') {

{
"name": "@rc-component/trigger",
"version": "1.1.1",
"version": "1.1.2",
"description": "base abstract trigger component for react",

@@ -5,0 +5,0 @@ "engines": {

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