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

react-portal

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-portal - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

9

build/portal.js

@@ -207,3 +207,10 @@ 'use strict';

}
this.portal = _reactDom2.default.unstable_renderSubtreeIntoContainer(this, _react2.default.cloneElement(props.children, { closePortal: this.closePortal }), this.node, this.props.onUpdate);
var children = props.children;
// https://gist.github.com/jimfb/d99e0678e9da715ccf6454961ef04d1b
if (typeof props.children.type === 'function') {
children = _react2.default.cloneElement(props.children, { closePortal: this.closePortal });
}
this.portal = _reactDom2.default.unstable_renderSubtreeIntoContainer(this, children, this.node, this.props.onUpdate);
}

@@ -210,0 +217,0 @@ }, {

@@ -153,5 +153,12 @@ import React from 'react';

}
let children = props.children;
// https://gist.github.com/jimfb/d99e0678e9da715ccf6454961ef04d1b
if (typeof props.children.type === 'function') {
children = React.cloneElement(props.children, { closePortal: this.closePortal });
}
this.portal = ReactDOM.unstable_renderSubtreeIntoContainer(
this,
React.cloneElement(props.children, { closePortal: this.closePortal }),
children,
this.node,

@@ -158,0 +165,0 @@ this.props.onUpdate

8

package.json
{
"name": "react-portal",
"version": "2.2.0",
"version": "2.2.1",
"description": "React component for transportation of modals, lightboxes, loading bars... to document.body",

@@ -61,5 +61,5 @@ "main": "build/portal",

"mocha-eslint": "^2.0.2",
"react": "^15.1.0",
"react-addons-test-utils": "^15.1.0",
"react-dom": "^15.1.0",
"react": "^15.2.0",
"react-addons-test-utils": "^15.2.0",
"react-dom": "^15.2.0",
"rimraf": "^2.5.0",

@@ -66,0 +66,0 @@ "sinon": "^1.17.4",

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