Comparing version 1.3.1 to 1.3.2
@@ -573,5 +573,3 @@ 'use strict'; | ||
var checkKeys = undefined; | ||
if (!props.loadData && _this4.checkKeys && _this4._checkedKeys && _this4._checkedKeys.every(function (i, index) { | ||
return checkedKeys[index] === i; | ||
})) { | ||
if (!props.loadData && _this4.checkKeys && _this4._checkedKeys && (0, _util.arraysEqual)(_this4._checkedKeys, checkedKeys)) { | ||
// if checkedKeys the same as _checkedKeys from onCheck, use _checkedKeys. | ||
@@ -578,0 +576,0 @@ checkKeys = _this4.checkKeys; |
@@ -16,2 +16,3 @@ /* eslint no-loop-func: 0*/ | ||
exports.getStrictlyValue = getStrictlyValue; | ||
exports.arraysEqual = arraysEqual; | ||
@@ -294,2 +295,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
return checkedKeys; | ||
} | ||
function arraysEqual(a, b) { | ||
if (a === b) return true; | ||
if (a === null || typeof a === 'undefined' || b === null || typeof b === 'undefined') return false; | ||
if (a.length !== b.length) return false; | ||
// If you don't care about the order of the elements inside | ||
// the array, you should sort both arrays here. | ||
for (var i = 0; i < a.length; ++i) { | ||
if (a[i] !== b[i]) return false; | ||
} | ||
return true; | ||
} |
{ | ||
"name": "rc-tree", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "tree ui component for react", | ||
@@ -46,2 +46,3 @@ "keywords": [ | ||
"pre-commit": "1.x", | ||
"rc-dialog": "^6.1.0", | ||
"rc-server": "3.x", | ||
@@ -48,0 +49,0 @@ "rc-tools": "4.x", |
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
63083
1480
13