Fix bug for with not finding parent node on repretitive trees
This commit is contained in:
parent
68f99a0d64
commit
d2cab2a1c4
@ -33,9 +33,9 @@ export const useTreeViewNodes = ({
|
|||||||
if (node.disabled) {
|
if (node.disabled) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
while (node.parentId != null) {
|
while (node && node.parentId != null) {
|
||||||
node = instance.getNode(node.parentId);
|
node = instance.getNode(node.parentId);
|
||||||
if (node.disabled) {
|
if (node?.disabled) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user