@sheinx/hooks 3.7.8-beta.2 → 3.7.8-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -504,7 +504,7 @@ var useTree = function useTree(props) {
|
|
504
504
|
(_context$value = context.value) === null || _context$value === void 0 || _context$value.forEach(function (id) {
|
505
505
|
var _ref3 = context.pathMap.get(id),
|
506
506
|
children = _ref3.children;
|
507
|
-
if (children.length) {
|
507
|
+
if (children && children.length) {
|
508
508
|
var noCheckedChildren = children.filter(function (cid) {
|
509
509
|
var _context$value2;
|
510
510
|
return !((_context$value2 = context.value) !== null && _context$value2 !== void 0 && _context$value2.includes(cid));
|
@@ -497,7 +497,7 @@ var useTree = function useTree(props) {
|
|
497
497
|
(_context$value = context.value) === null || _context$value === void 0 || _context$value.forEach(function (id) {
|
498
498
|
var _ref3 = context.pathMap.get(id),
|
499
499
|
children = _ref3.children;
|
500
|
-
if (children.length) {
|
500
|
+
if (children && children.length) {
|
501
501
|
var noCheckedChildren = children.filter(function (cid) {
|
502
502
|
var _context$value2;
|
503
503
|
return !((_context$value2 = context.value) !== null && _context$value2 !== void 0 && _context$value2.includes(cid));
|