hoist-non-react-statics
Advanced tools
Comparing version 1.0.6 to 1.1.0
@@ -27,7 +27,7 @@ /** | ||
module.exports = function hoistNonReactStatics(targetComponent, sourceComponent) { | ||
module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { | ||
if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components | ||
var keys = Object.getOwnPropertyNames(sourceComponent); | ||
for (var i=0; i<keys.length; ++i) { | ||
if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]]) { | ||
for (var i = 0; i < keys.length; ++i) { | ||
if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) { | ||
try { | ||
@@ -34,0 +34,0 @@ targetComponent[keys[i]] = sourceComponent[keys[i]]; |
{ | ||
"name": "hoist-non-react-statics", | ||
"version": "1.0.6", | ||
"version": "1.1.0", | ||
"description": "Copies non-react specific statics from a child component to a parent component", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
23865