Comparing version 7.0.12 to 7.0.13
@@ -23,7 +23,3 @@ 'use strict'; | ||
function toArray(children) { | ||
if (Array.isArray(children)) { | ||
return children.filter(function (c) { | ||
return !!c; | ||
}); | ||
} | ||
// allow [c,[a,b]] | ||
var c = []; | ||
@@ -39,10 +35,9 @@ _react2["default"].Children.forEach(children, function (child) { | ||
function getActiveIndex(children, activeKey) { | ||
var activeIndex = -1; | ||
_react2["default"].Children.forEach(children, function (child, index) { | ||
if (child.key === activeKey) { | ||
activeIndex = index; | ||
var c = toArray(children); | ||
for (var i = 0; i < c.length; i++) { | ||
if (c[i].key === activeKey) { | ||
return i; | ||
} | ||
}); | ||
return activeIndex; | ||
} | ||
return -1; | ||
} | ||
@@ -49,0 +44,0 @@ |
{ | ||
"name": "rc-tabs", | ||
"version": "7.0.12", | ||
"version": "7.0.13", | ||
"description": "tabs ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
56928
1519
0